Página 1 de 1

Where's the list of sample projects?

Publicado: Jue Jun 01, 2023 2:58 am
por DC
Hi,

Which folder has a list of the sample Xailer projects, with their descriptions? I'm specifically looking for ways of taking shapes like rectangles or triangles, and moving them around the form or canvas with the mouse and keyboard.

I tried some simple code with TShape, but it doesn't show anything. The object gets created, but it isn't visible.

Código: Seleccionar todo

METHOD GenerateShapes( oSender ) CLASS frm_TUIEmulation
Local Var_s := ""
Local Rectangle_shp

Rectangle_shp = TShape()
Rectangle_shp:nShapeType = stRECTANGLE
Rectangle_shp:lEnabled := .T.
Rectangle_shp:lVisible := .T.
Rectangle_shp:nClrLine := clBlack
Rectangle_shp:nClrPane := clPurple

Rectangle_shp:nHeight := 230
Rectangle_shp:nLeft := 480
Rectangle_shp:nLineWidth := 4
Rectangle_shp:nOpacity := 80
Rectangle_shp:nTop := 5
Rectangle_shp:nLeft := 5
Rectangle_shp:nVertices := 7
Rectangle_shp:nWidth := 222
Rectangle_shp:lFillShape := .T.
// ::frm_TUIEmulation:ReDraw(.T.)
::frm_TUIEmulation:Refresh(.T.)


// Temporary Breakpoint
Var_s := "XXXXX"

RETURN Nil

By the way, the Help for TShape is in Spanish. The rest of the Help file is English.

Re: Where's the list of sample projects?

Publicado: Dom Jun 04, 2023 12:21 am
por DC
Is there a reason why my Support queries are being ignored?

Re: Where's the list of sample projects?

Publicado: Lun Jun 05, 2023 12:33 pm
por ignacio
>>By the way, the Help for TShape is in Spanish. The rest of the Help file is English.

Sorry, we will try to fix it ASAP.

>>I tried some simple code with TShape, but it doesn't show anything. The object gets created, but it isn't visible.

Send a sample project. TIA.

Código: Seleccionar todo

METHOD GenerateShapes( oSender ) CLASS frm_TUIEmulation
Local Var_s := ""
Local Rectangle_shp

Rectangle_shp = TShape()
Rectangle_shp:nShapeType = stRECTANGLE
Rectangle_shp:lEnabled := .T.
Rectangle_shp:lVisible := .T.
Rectangle_shp:nClrLine := clBlack
Rectangle_shp:nClrPane := clPurple

Rectangle_shp:nHeight := 230
Rectangle_shp:nLeft := 480
Rectangle_shp:nLineWidth := 4
Rectangle_shp:nOpacity := 80
Rectangle_shp:nTop := 5
Rectangle_shp:nLeft := 5
Rectangle_shp:nVertices := 7
Rectangle_shp:nWidth := 222
Rectangle_shp:lFillShape := .T.
// ::frm_TUIEmulation:ReDraw(.T.)
::frm_TUIEmulation:Refresh(.T.)
BTW, This is not a valid Xailer code:

1) TShape():New(Self)
2) properties, ....
3) TShape():Create()
4) ::frm_TUIEmulation:ReDraw(.T.) --> Useless. BTW, this IS simple: ::Redraw( .T. )
5) ::frm_TUIEmulation:Refresh(.T.) --> Useless also.

The Shape DOES NOT BELONG to any control. I hope its clear.

Regards,

Re: Where's the list of sample projects?

Publicado: Lun Jun 05, 2023 3:51 pm
por DC
Thanks,

But also I recall that there was a section of the Help text, or some readme file or something, which had the list of sample projects. I wanted to search through the descriptions.

Re: Where's the list of sample projects?

Publicado: Lun Jun 05, 2023 4:01 pm
por ignacio
Imagen 087.png
Imagen 087.png (5.76 KiB) Visto 2056 veces

Re: Where's the list of sample projects?

Publicado: Lun Jun 05, 2023 4:01 pm
por ignacio
DC escribió: Lun Jun 05, 2023 3:51 pm Thanks,

But also I recall that there was a section of the Help text, or some readme file or something, which had the list of sample projects. I wanted to search through the descriptions.
Added to the TODO list. Thanks for the tip.

Regards,

Re: Where's the list of sample projects?

Publicado: Lun Jun 05, 2023 5:45 pm
por ignacio
https://www.xailer.com/help/xaileren.rar


Includes TShape in english.

Regards,

Re: Where's the list of sample projects?

Publicado: Mié Jun 07, 2023 1:34 am
por DC
Thanks, Ignacio.

ignacio escribió: Lun Jun 05, 2023 5:45 pm https://www.xailer.com/help/xaileren.rar


Includes TShape in english.

Regards,

Re: Where's the list of sample projects?

Publicado: Mié Jun 07, 2023 1:41 am
por DC
I don't understand what the image is about. I traced through with my button, and it executes all of the code in

METHOD TestShapesGeneration( oSender ) CLASS frm_ShapeTests


, but nothing displays other than the form itself.

The attached image is after all the code is executed.



ignacio escribió: Lun Jun 05, 2023 4:01 pmImagen 087.png
Shape_test_form.jpg
Shape_test_form.jpg (19.85 KiB) Visto 2013 veces

Re: Where's the list of sample projects?

Publicado: Mié Jun 07, 2023 10:39 am
por ignacio
With your code:

Código: Seleccionar todo

METHOD TestShapesGeneration( oSender ) CLASS frm_ShapeTests
Local Var_s := ""
Local Rectangle_shp

Rectangle_shp = TShape():New( Self )
Rectangle_shp:nShapeType = stRECTANGLE
Rectangle_shp:lEnabled := .T.
Rectangle_shp:lVisible := .T.
Rectangle_shp:nClrLine := clBlack
Rectangle_shp:nClrPane := clPurple

Rectangle_shp:nHeight := 230
Rectangle_shp:nLeft := 480
Rectangle_shp:nLineWidth := 4
Rectangle_shp:nOpacity := 80
Rectangle_shp:nTop := 5
Rectangle_shp:nLeft := 5
Rectangle_shp:nVertices := 7
Rectangle_shp:nWidth := 222
Rectangle_shp:lFillShape := .T.

Rectangle_shp:Create()
I suggest you take a look at the XFM files to see how a control MUST be instantiated.

Regardss

Re: Where's the list of sample projects?

Publicado: Mié Jun 07, 2023 10:41 am
por jfgimenez
Hi,

TShape is a control, so you have to "create" it on the form or another container. Try changing the first line as:

Código: Seleccionar todo

Rectangle_shp = TShape():Create( Self )
Regards.

Re: Where's the list of sample projects?

Publicado: Jue Jun 08, 2023 6:06 pm
por DC
That did it, thanks Ignacio/jfgimenez.

Do you have any tips, on how to set it up to move the box around with the arrow key?

Should I just do an inkey loop, and check for K_DOWN, UP, LEFT, RIGHT? Or is there already a function that performs this?

Re: Where's the list of sample projects?

Publicado: Jue Jun 08, 2023 6:28 pm
por ignacio
Hi DC,

Check the attached project. BTW, it also works with the mouse ;-)

Regards,

Re: Where's the list of sample projects?

Publicado: Vie Jun 09, 2023 6:12 pm
por DC
A TBevel? I didn't know there was any such animal. I need to spend more time with Xailer.

Thanks, Ignacio. You saved me a lot of time and searching. In fact, I wouldn't have even used this object, because I didn't know about it.