Hide controls in a dialog before activating it.

Re: Hide controls in a dialog before activating it.

Postby James Bott » Sat May 29, 2010 12:10 am

Antonio,

Then maybe these methods should be something like this?

Code: Select all  Expand view  RUN
  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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Hide controls in a dialog before activating it.

Postby Antonio Linares » Sat May 29, 2010 5:26 am

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().
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Hide controls in a dialog before activating it.

Postby Marcelo Via Giglio » Sat May 29, 2010 6:50 am

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
Marcelo Via Giglio
 
Posts: 1065
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Hide controls in a dialog before activating it.

Postby concentra » Mon May 31, 2010 11:11 am

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. !
User avatar
concentra
 
Posts: 124
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Hide controls in a dialog before activating it.

Postby Antonio Linares » Mon May 31, 2010 1:50 pm

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Hide controls in a dialog before activating it.

Postby Manuel Valdenebro » Sun Apr 03, 2011 5:44 am

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
Un saludo

Manuel
User avatar
Manuel Valdenebro
 
Posts: 706
Joined: Thu Oct 06, 2005 9:57 pm
Location: Málaga-España

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 37 guests