T.R | Title | User | Personal Name | Date | Lines |
---|
1122.1 | How to change an icon title for a dialog box | KOBAL::SCAER | | Mon Jul 17 1989 19:13 | 11 |
|
To change the title in a dialog box icon, do the following:
Arg arglist[1];
XtSetArg(arglist[0], XtNiconName, title);
XtSetValues(w, arglist, 1);
where 'w' is the dialog box and 'title' is its title, a
null-terminated string
|
1122.2 | This wont work for the file selection widget. | ASD::ROSSI | | Tue Jul 18 1989 10:34 | 18 |
| > Arg arglist[1];
> XtSetArg(arglist[0], XtNiconName, title);
> XtSetValues(w, arglist, 1);
> where 'w' is the dialog box and 'title' is its title, a
> null-terminated string
I thought this would be the way to set it also (for the file selection
widget) but it doesn't work. I don't think the name "Popup" should appear
at all for the icon name if the title has been set. Something isn't right
here. The questions I'm asking are specific to the file selection widget.
I guess what I'm asking is why doesn't the above code work. And since it doesn't
what can I do about it. Should I use DwtFileSelectionCreate instead of a UIL
definition? I can't imagine that there will be any difference. I basically
want the Modless file selection window with an icon name matching the title.
-MR
|
1122.3 | oops, sorry | KOBAL::SCAER | | Tue Jul 18 1989 14:14 | 9 |
|
Perhaps I was mistaken, try this instead:
Arg arglist[1];
XtSetArg(arglist[0], XtNiconName, title);
XtSetValues(XtParent(w), arglist, 1);
|
1122.4 | that's it. | ASD::ROSSI | | Wed Jul 19 1989 11:24 | 2 |
| Thats what I needed. Thanks. I changed the icon and everything.
|
1122.5 | explaination | CB750C::BOLGATZ | | Wed Jul 19 1989 14:40 | 30 |
|
some explaination is in order...
(1) toolkit popups by default do not have iconify buttons unless their
parent's shell is unmanaged (and it is therefore NOT in a window
group). For example, create toplevel via XtInitialize, then
create a modeless fileselection widget as a child of toplevel,
then manage the fileselection widget (without realizing toplevel).
(2) toolkit popus create a hidden shell 'behind the application's
back.' This is how popups POP UP. Most toolkit popup dialog
boxes create their hidden shell with the name "Popup" (left over
from pre-V1).
(3) There is a quirk (bug) in the toolkit that the icon button label is
taken from widget name (the shell created by fileselection), not
the dialog box title.
Therefore -- when you create a fileselection widget whose parent's shell
is not realized, its iconify button label is "Popup". And to change to the
iconify button label via SetValues, you must modify its 'owner' - the
shell widget that was created by the fileselection widget (ie its 'real'
parent). 5
The iconify button label will match the fileselection title in V3.
Until then you'll have to use SetValues.
Jay Bolgatz
|
1122.6 | thanks. | ASD::ROSSI | | Wed Jul 19 1989 16:26 | 1 |
|
|