Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Stefan S. on February 16, 2009, 01:34:18 pm



Title: fgl_winquestion
Post by: Stefan S. on February 16, 2009, 01:34:18 pm
When I call a fgl_winquestion outside of an input-Statement  (f.e. after displaying the form) the message-window is displayed somewhere left on the screen.
When I call it in an after field section the message-window is displayed in the center of the opend window.

Is it a buck, or is there a possibility to set the position of the message-window ?

Kind regars

Stefan Serwe


Title: Re: fgl_winquestion
Post by: Reuben B. on February 16, 2009, 10:42:16 pm
Hi Stefan,

When the message-window is displayed "somewhere left on the screen", what you will probably find is that the message window is being displayed in the center of the SCREEN window.  Move the SCREEN window around and you will hopefully find that when the message-window is displayed without any other window being open, it is opening in the same place you have moved the SCREEN window to.

One way to make the message-window appear in the center of the  screen if there are no other open windows is to make the SCREEN window appear in the center of the screen.  This can be achieved by adding the position Style Attribute to Window.main in your .4st file

  <Style name="Window.main">
     <StyleAttribute name="windowType" value="normal" />
     <StyleAttribute name="startMenuPosition" value="menu" />
     <StyleAttribute name="position" value="center" />
  </Style>

If this solution isn't suitable, the source for fgl_winquestion and other dialogs is held in $FGLDIR/src/fgldialog.4gl, and compiles to $FGLDIR/lib/fgldialog.42m.  You can investigate other potential solutions by looking at that source and control+right-clicking in the GDC to get a debug tree.

I wouldn't recommend you edit directly what is in $FGLDIR/src or $FGLDIR/lib  but copy it elsewhere and put the compiled code higher in the load path than $FGLDIR/lib

Hope that helps,

Reuben