[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Toolbox] Disabling (not Hiding) items in dialog boxes?



At 8:02 AM -0700 5/20/99, John W Baxter wrote:
>At 9:01 -0400 5/20/99, Chris Nandor wrote:
>>At 7.51 -0400 1999.05.20, Alan Fry wrote:
>>>As far as I know you cannot do this. It is tempting to think that it might
>>>be possible to change the current 'RGBForeColor()' to a gray and then
>>>re-set the button text. However the machine will crash if you use
>>>'SetDialogItemText()'. 'GetDialogItemText()' is alo broken, returning
>>>garbage prepended to the string.
>>
>>How would you do it in C?  Is there a function missing from MacPerl's
>>modules that could be added in?
>
>There is a half page (or a bit more) near the beginning of the Dialog
>Manager part of Inside Mac which boils down to:
>    If what you want to do in a dialog is hard,
>    do the job with a window instead.
>
>However, I don't remember simply disabling a control (drawing it gray and
>making it ignore clicks) as being "hard".  It's been a long time, though.
>

I remember something like 'EnableDialogItem'.  But, in a somewhat brief
glance at the toolbox references online, I can't find it.  I'm fairly sure
there's a flag that's settable in the resource, but that's not what we're
looking at here.

The way I remember doing it (and it's been a while), I would set the enable
flag before drawing the dialog box, but I don't remember how it was done.

Wait, I think I found it.  There's a constant, itemDisable, that gets added
to  the item type to disable it.

-Jeff Lowrey



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-toolbox-request@macperl.org