Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
In DECwrite, DECdecision or Paint, you must have noticed that there are some items in some pull-down memus are disable and its text color is much lighter than other enabled item. This happens when you're in some specific mode. I would like to implement this feature in my user interface but I can't find any example showing this feature. Could any tell me how to program it in XUI? Any example available? Johnny
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
3256.1 | Set the sensitivity attribute of the push_button | TOWNS::RUFFIEUX | Fri Aug 24 1990 09:57 | 35 | |
If I am understanding you correctly, you would like to set the sensitvity of a push_button in a pull-down menu. step 1: Be sure to do a create in your UIL on the push_button. Also, you can set the initial sensitivity here. ( By default it is True, meaning you CAN use it ) object button_pb : push_button { arguments { label_label = compound_string('Button'); sensitive = false; }; callbacks { create = procedure createCB(BUTTON_PB); }; }; Step 2: Now, in you C code ( or whatever language you use ) when you are ready to make the button accessible: Arg al[1]; . . XtSetArg(al[0],DwtNsensitive,True); XtSetValues(widgets[BUTTON_PB],al,1); This will make the button sensitive. Hope this helps... Chris | |||||
3256.2 | BBOOP::SCAER | Fri Aug 24 1990 14:04 | 7 | ||
> XtSetArg(al[0],DwtNsensitive,True); > XtSetValues(widgets[BUTTON_PB],al,1); Calling XtSetSensitive might be more efficient: XtSetSensitive(widgets[BUTTON_PB], True); | |||||
3256.3 | Thanks! | TPOVC::JOHNNYHO | Mon Aug 27 1990 07:14 | 3 | |
Thank you! That's what I need! Johnny | |||||
3256.4 | CLTMAX::dick | Schoeller - Failed Xperiment | Mon Aug 27 1990 12:41 | 7 | |
The other advantage of XtSetSensitive (over XtSetValues) is that it cascades into children. That way you can set a menu and its children insensitive with a single call. This can be especially important for affecting complex widgets which are made up of multiple children (ie: list box). In that case the XtSetValues call may not affect the children resulting in unexpected behavior. Dick |