Hide a Checkbox from Resource.
-
- Posts: 388
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Hide a Checkbox from Resource.
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
Byron Hopp
Matrix Computer Services
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
-
- Posts: 388
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Re: Hide a Checkbox from Resource.
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
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
Matrix Computer Services
-
- Posts: 388
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Re: Hide a Checkbox from Resource.
It appears that I need to perform this after the activate of the dialog. Works great. Thanks,
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services
Re: Hide a Checkbox from Resource.
STATIC oChk ??
Regards.
Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
-
- Posts: 388
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Re: Hide a Checkbox from Resource.
I hide them using the "ON INIT" when activating the dialog. Seemed to work well.
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services
Re: Hide a Checkbox from Resource.
Maybe:
Regards, saludos.
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
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Hide a Checkbox from Resource.
Yes.byron.hopp wrote:It appears that I need to perform this after the activate of the dialog. Works great. Thanks,
We need to remember this always in case of all controls created on a dialog.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India