Hide a Checkbox from Resource.

Post Reply
byron.hopp
Posts: 388
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Hide a Checkbox from Resource.

Post by byron.hopp »

Is there a trick to hide a checkbox on a dialog which I access through an RC file. I am making a calendar routine and wanted to hide all days outside of the current month, I can disable them so the user cannot check them, but I wanted to make them disappear. Thanks,
Thanks,
Byron Hopp
Matrix Computer Services
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Hide a Checkbox from Resource.

Post by nageswaragunupudi »

oChkBox:Hide()
Regards

G. N. Rao.
Hyderabad, India
byron.hopp
Posts: 388
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: Hide a Checkbox from Resource.

Post by byron.hopp »

That was my first guess but this does not seem to work.

For dDay := dStart to dEnd
nEle++
nId++
lVar := FALSE
oChk := nil

If dDay >= dFrom .AND. dDay <= dTo
Redefine CheckBox oChk Var lVar Id nId of oDlg
oChk:SetText( PadL( Day(dDay),2,"0" ) )
oChk:cargo := dDay
oChk:SetCheck( FALSE )
Else
Redefine CheckBox oChk Var lVar Id nId of oDlg
oChk:Hide()
Endif
Next
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
Posts: 388
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: Hide a Checkbox from Resource.

Post by byron.hopp »

It appears that I need to perform this after the activate of the dialog. Works great. Thanks,
Thanks,
Byron Hopp
Matrix Computer Services
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Hide a Checkbox from Resource.

Post by karinha »

STATIC oChk ??

Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
byron.hopp
Posts: 388
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: Hide a Checkbox from Resource.

Post by byron.hopp »

I hide them using the "ON INIT" when activating the dialog. Seemed to work well.
Thanks,
Byron Hopp
Matrix Computer Services
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Hide a Checkbox from Resource.

Post by karinha »

Maybe:

Code: Select all | Expand

   REDEFINE CHECKBOX OCHK VAR LVAR ID NID OF ODLG // WHEN(.. )

   IF DDAY >= DFROM .AND. DDAY <= DTO

      ACTIVATE DIALOG ODLG CENTER // NORMAL

   ELSE

       ACTIVATE DIALOG ODLG CENTER ON INIT( OCHK:HIDE() )

   ENDIF
 
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Hide a Checkbox from Resource.

Post by nageswaragunupudi »

byron.hopp wrote:It appears that I need to perform this after the activate of the dialog. Works great. Thanks,
Yes.
We need to remember this always in case of all controls created on a dialog.
Regards

G. N. Rao.
Hyderabad, India
Post Reply