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.

TChooseColorDlg - how to centralize?

Xailer professional forum in English
Responder
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

TChooseColorDlg - how to centralize?

Mensaje por Hurricane »

Hi,

How to center the ChooseColor window on the monitor (or Code Editor), vertical and horizontal?
In an application, the position works, but inside the plugin it doesn't.

Código: Seleccionar todo

   with object TChooseColorDlg():new(::GetProjectMan():oForm)

      //:lCenter:=.t.  // It's at the top left and the Xailer is maximized.
      :Create()
      IF :Run()
dlg_color2.png
dlg_color2.png (24.3 KiB) Visto 551 veces

Código: Seleccionar todo

   with object TChooseColorDlg():new(::GetProjectMan():oForm)

      :lCenter:=.t. // A part off the monitor (Xailer is maximized)
      :Create()
      IF :Run()
dlg_color1.png
dlg_color1.png (21.43 KiB) Visto 551 veces
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9253
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: TChooseColorDlg - how to centralize?

Mensaje por ignacio »

Hi,

The plugin is not a window itself. Two options:

1) Make the TChooseDlg parent object to the window object you want to be centered:

Código: Seleccionar todo

oDlg := TChooseDlg():New( oMiPluginWindow )
2) Use the OnShow() event to change its coordinates

If nothing of this work, I'm afraid there is nothing you can do.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: TChooseColorDlg - how to centralize?

Mensaje por Hurricane »

I understood nothing: (1) it doesn't seem possible, side effects... (2) that's the question. you didn't show how to do it.

Can I use Code Editor instance as a parent?
I used this instance and ChooseColorDlg is in the center of it.
Perhaps the plugin needs tweaking to accommodate these basic needs.
ignacio escribió: Vie Dic 24, 2021 10:55 am The plugin is not a window itself. Two options:

1) Make the TChooseDlg parent object to the window object you want to be centered:

Código: Seleccionar todo

oDlg := TChooseDlg():New( oMiPluginWindow )
2) Use the OnShow() event to change its coordinates

If nothing of this work, I'm afraid there is nothing you can do.
Responder