home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.ms.programmer,comp.lang.pascal
- Path: sparky!uunet!usc!cs.utexas.edu!tamsun.tamu.edu!gergo.tamu.edu!chris
- From: chris@gergo.tamu.edu (Chris King)
- Subject: Re: Disabling Autoradiobuttons at run time - TPW
- Message-ID: <13AUG199209371119@gergo.tamu.edu>
- News-Software: VAX/VMS VNEWS 1.41
- Keywords: Buttons TPW
- Sender: news@tamsun.tamu.edu (Read News)
- Organization: Geochemical and Environmental Research Group - TAMU
- References: <dekock.713691787@shannon>
- Date: Thu, 13 Aug 1992 15:37:00 GMT
- Lines: 21
-
- In article <dekock.713691787@shannon>, dekock@shannon.ee.wits.ac.za (Nick de Kock) writes...
- >I have an application in which I require the selection of 1 out of
- >a series of options. Depending on certain conditions some of these
- >options are unavailable at certain times. I need to disable certain
- >of the buttons.
-
- What you can do is set a boolean that refers to the status of the button,
- and in your methods that are called when you press that button, place a
- line like
-
- if buttondisabled then exit;
-
- I know this works, since I use it. There are also ways of destroying the
- button (since it is after all just another window) or hiding it, you may
- even be able to dynamically change it's ID and that would disable it's
- associated methods, then change it back when you need it again.
-
- I use the rather brutal approach of a boolean.
-
- Chris King
-
-