-
June 6th, 2008, 02:09 PM
#1
[RESOLVED] X Windows widget questions...
X Windows questions...
1) Is there a call to retrieve the children widgets of a given parent?
2) Can a widget be modified if you're in a callback that was executing by the same widget?
The reason for question 2 is I would like to add children widgets to a particular widget, and I would like to do this from a callback that is currently executing from the widget in question. When I try this, my program core dumps. I can, however, add children to a particular widget if I am in some other callback that was executing from a completely different widget.
-
June 6th, 2008, 03:37 PM
#2
Re: X Windows widget questions...
Never mind question 2, I think(?) I've found my problem. I do still need an answer for question 1. Thanks.
-
June 26th, 2008, 12:05 PM
#3
Re: X Windows widget questions...
Which X library are you using? GTK+, qt, wxWidgets? There isn't a single API.
-
July 7th, 2008, 02:12 PM
#4
Re: X Windows widget questions...
Originally Posted by IllegalCharacter
Which X library are you using? GTK+, qt, wxWidgets? There isn't a single API.
Sorry, I've been on vacation for the last week and a half.
The library is X11 (sorry, I didn't realize there were so many variants of X libraries). However, I found an answer to my problem a few days before I left on vacation. I needed two different retrieval methods. One using the widget.core.popup_list[] array, and the other using the XtNchildren and XtNnumChildren attributes with the XtGetValues() function. This seemed to retrieve everything I needed in order to traverse a widget tree both forward and backward.
What I was doing was searching for a particular widget that existed in a particular widget tree from some given node in the middle of the tree. Of course, after doing all that work, about a day or two later, I discovered an even easier way to get what I wanted, using the XtNameToWidget() function. What I didn't realize at the time was that I had access to the top level widget and was able to use this function to traverse the entire tree starting at the top of the tree.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|