In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Where's the list of sample projects?

Xailer professional forum in English
Responder
DC
Mensajes: 125
Registrado: Lun May 16, 2011 6:06 pm

Where's the list of sample projects?

Mensaje 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.
Adjuntos
TShapeHelp.jpg
TShapeHelp.jpg (51.2 KiB) Visto 2681 veces
DC
Mensajes: 125
Registrado: Lun May 16, 2011 6:06 pm

Re: Where's the list of sample projects?

Mensaje por DC »

Is there a reason why my Support queries are being ignored?
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9256
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Where's the list of sample projects?

Mensaje 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,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 125
Registrado: Lun May 16, 2011 6:06 pm

Re: Where's the list of sample projects?

Mensaje 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.
Adjuntos
ShapeTests.zip
(2.39 KiB) Descargado 84 veces
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9256
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Where's the list of sample projects?

Mensaje por ignacio »

Imagen 087.png
Imagen 087.png (5.76 KiB) Visto 2624 veces
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9256
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Where's the list of sample projects?

Mensaje 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,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9256
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Where's the list of sample projects?

Mensaje por ignacio »

https://www.xailer.com/help/xaileren.rar


Includes TShape in english.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 125
Registrado: Lun May 16, 2011 6:06 pm

Re: Where's the list of sample projects?

Mensaje 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,
DC
Mensajes: 125
Registrado: Lun May 16, 2011 6:06 pm

Re: Where's the list of sample projects?

Mensaje 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 2581 veces
Adjuntos
ShapeTests.zip
(2.42 KiB) Descargado 84 veces
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9256
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Where's the list of sample projects?

Mensaje 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
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5707
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Re: Where's the list of sample projects?

Mensaje 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.
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
DC
Mensajes: 125
Registrado: Lun May 16, 2011 6:06 pm

Re: Where's the list of sample projects?

Mensaje 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?
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9256
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Where's the list of sample projects?

Mensaje por ignacio »

Hi DC,

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

Regards,
Adjuntos
MovingBox.zip
(2.5 KiB) Descargado 85 veces
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 125
Registrado: Lun May 16, 2011 6:06 pm

Re: Where's the list of sample projects?

Mensaje 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.
Responder