Page 2 of 2

Re: Hide controls in a dialog before activating it.

PostPosted: Sat May 29, 2010 12:10 am
by James Bott
Antonio,

Then maybe these methods should be something like this?

Code: Select all  Expand view
  METHOD Hide() INLINE ::lVisibile:=.F., ShowWindow( ::hWnd, SW_HIDE )

   METHOD Show() INLINE  ::lVisible:=.T., ShowWindow( ::hWnd, SW_SHOWNA )


However, I have not looked at the code to see how the var lVisible is actually used.

James

Re: Hide controls in a dialog before activating it.

PostPosted: Sat May 29, 2010 5:26 am
by Antonio Linares
James,

Actually DATA lVisible just stores the visible status but it does not perform any action if we change it, in example if we do oControl:lVisible := .F. then the control will not be hidden.

Thats why in order to implement that functionality, DATA lVisible should be turned into a Method. But I am afraid that such change could break existing users code, meanwhile such functionality can be done using Methods Hide() and Show().

Re: Hide controls in a dialog before activating it.

PostPosted: Sat May 29, 2010 6:50 am
by Marcelo Via Giglio
Hello,

this remember me this topic http://forums.fivetechsupport.com/viewtopic.php?f=22&t=9676 in the TO DO forum isn't it?

regards

Marcelo

Re: Hide controls in a dialog before activating it.

PostPosted: Mon May 31, 2010 11:11 am
by concentra
Antonio Linares wrote:James,

Actually DATA lVisible just stores the visible status but it does not perform any action if we change it, in example if we do oControl:lVisible := .F. then the control will not be hidden.

such functionality can be done using Methods Hide() and Show().


Anyway, if I call a HIDE() in an control before the dialog is initialized, when the dialog is shown the control is not hidden and lVisible := .F. !

Re: Hide controls in a dialog before activating it.

PostPosted: Mon May 31, 2010 1:50 pm
by Antonio Linares
Concentra,

Yes, you are right, as the control still does not have a valid Windows handle. We could modify this, but actually it is implemented this way.

So the calls to oControl:Hide() or oControl:Show() must be issued from the ON INIT clause of the dialog, as from that moment on, the controls have a valid Windows handle.

Re: Hide controls in a dialog before activating it.

PostPosted: Sun Apr 03, 2011 5:44 am
by Manuel Valdenebro
ukoenig wrote:You can Hide a Control on Dialog-Init :

ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( GradBrush( oDlg, { { 0.50, 16314573, 14853684 }, ;
{ 0.50, 14853684, 16314573 } }, .T. ), ;
oSay1:Hide() ) ;


Ich benutze Heute das.

Gracias por tu ayuda ( Danke Uwe für deine Hilfe).

Tschüss