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

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



Hi all-

Thanks for all your help.  Thanks to a friend of mine who 
consistently makes me feel entirely inadequate as a programmer (his 
response--with the correct answer--began with "I haven't ever tried 
to create a dialog in MacPerl, but..."), I have the solution.  It is:

#DisableDialogItem
sub DisableDialogItem {
	my($dlg, $item) = @_;
	my($type, $handle, $box) = GetDialogItem($dlg->window(), $item);

	bless($handle, 'ControlHandle');
	Mac::Controls::HiliteControl $handle, 255;
}

#EnableDialogItem
sub EnableDialogItem {
	my($dlg, $item) = @_;
	my($type, $handle, $box) = GetDialogItem($dlg->window(), $item);

	bless($handle, 'ControlHandle');
	Mac::Controls::HiliteControl $handle, 0;
}


I hope other people find this useful as well....

Thanks again,

Ian
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Ian Crew
Web Systems Developer
IS&T/Workstation Support Services
University of California at Berkeley
297 Evans Hall, (510) 642-7795
icrew@socrates.berkeley.edu

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