[futurebasic] RE: [FB] Greyed items in a Dialog

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: Chris.Young@...
Date: Tue, 18 May 1999 10:08:04 -0500
Paul

You need to get the handle to the control in question (the OK button) 
using 
CALL GETDITEM(theDLOGPtr&,theItemNo,iType,iHandle&,itemRect)

and then grey it out using

CALL HILITECONTROL(iHandle&,255)

or bring it back via:

CALL HILITECONTROL(iHandle&,0)

If you want to toggle it, you can take a look at 
PEEK([iHandle&] + _contrlHilite), which will either be 255 (it is grey) 
o 0 (normal)

hth

Chris Young

On Tuesday, May 18, 1999 9:59 AM, paul.bruneau 
[SMTP:paul_bruneau@...] wrote:
> No, I use the Dialog Manager to tell me when the user "hits" an item 
in
> the dialog. The dialog has a sort of event loop which handles this
> nicely. That part is not a concern to me. I just want to know how to
> gray out or disable a dialog item.
> 
> Thanks anyway,
> PB
> 
> PS: If you want the source to the easy way to do a dialog (which it
> sounds like you could use), let me know! :)
> 
> Pete wrote:
> > 
> > > Hi everyone!
> > >
> > > I am making an import dialog box, and I'd like to disable the OK 
button
> > > until the user has put stuff into the box that makes sense.
> > >
> > > Actually, the default stuff will make sense, but I want to 
disable the
> > > OK button if the user puts something stupid in there (like trying 
to
> > > import thingy #5 from a file that has only 4 thingies. You get the
> > > point), and then re-enable the OK button after they delete the 
stupid
> > > stuff and put back in the thoughtful, intelligent stuff.
> > >
> > > I'm sure this is a common thing, but suddenly I can't find any
> > > documentation or code examples in my FB books to do it.
> > >
> > > I even looked twice and indeed, I was again stricken with the 
lack of
> > > info.
> > >
> > > Can anyone point me in the right direction? I'm not afraid of the
> > > toolbox, and looked in that part of the Handbook as well to no 
avail.
> > >
> > > Thanks,
> > 
> > Sounds like you need to write an ENTERPROC and and have SFPGETFILE 
call it
> > to filter keystrokes and control dialog buttons based on what the 
user has
> > entered...
> > 
> > hth
> > 
> > Pete...
> 
> --
> To unsubscribe, send ANY message to 
<futurebasic-unsubscribe@...>
>  << File: Re_ [FB] Greyed items in a Dialog.TXT >>