This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Hiding labels
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2008
10:41 AM
Hiding labels
Hi,
I have a simple question. I am making a custom dialog. I want to disable a label on the screen and then enable it later depending on the value of a variable. Could someone please show me how to do this. I thought I had it but for some reason it won't work.
The label will be disabled (made invisible) upon entering the dialog. It will then be enabled if the variable SHOWDIALOG is set to true.
Thanks in advance,
Kevin
I have a simple question. I am making a custom dialog. I want to disable a label on the screen and then enable it later depending on the value of a variable. Could someone please show me how to do this. I thought I had it but for some reason it won't work.
The label will be disabled (made invisible) upon entering the dialog. It will then be enabled if the variable SHOWDIALOG is set to true.
Thanks in advance,
Kevin
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2008
02:24 PM
Hello,
Try this...
Explanation:
The hDlg is the handle of the custom dialog. The nCotrolID should be the ID number of the label you want to be visible or invisible. Of coarse, the bState is a TRUE/FALSE value that will decide to hide it or not.
Try this...
prototype My_ControlVisible(BYVAL number, BYVAL number, BYVAL BOOL);
function My_ControlVisible(hDlg, nControlID, bState)
number hCtrl;
begin
hCtrl = GetDlgItem(hDlg, nControlID);
if bState then
ShowWindow(hCtrl, SW_SHOW);
else
ShowWindow(hCtrl, SW_HIDE);
endif;
end;
Explanation:
The hDlg is the handle of the custom dialog. The nCotrolID should be the ID number of the label you want to be visible or invisible. Of coarse, the bState is a TRUE/FALSE value that will decide to hide it or not.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2008
03:28 PM
I think the ISMP control classes support a setVisible method with which you can hide or show controls; searching these forums for "setVisible" will turn up some examples.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
09:14 AM
It worked. Thank you.
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)