29 Mar 2013 9:52 PM #1
Answered: How to get the buttons in a titlebar?
According to the docs, the default items of the titlebar is xbutton. So I have a titlebar and three buttons added to it. So the titlebar has three items. One button aligned to left and two to the right.
However, when in my controller I do a this.getTitleBar().getItems() it doesn't return buttons. It returns containers and components. One of the component is the title of the titlebar, which I get.
In order to get to the buttons, they are buried as innerItems of various containers. This doesn't make any sense to me.
If the documentation says that getItems() will return the items of the titlebar, and if I add three buttons, why am I not getting three buttons back?
How can I get an array of the items (which are buttons) of a titlebar? I need to iterate through all the buttons in the titlebar and this seemingly simple task is turning out to be a nightmare.
30 Mar 2013 1:43 AM #2
30 Mar 2013 3:57 AM #3
Eye doctor needed in isle four...eye doctor, isle four please!
Oh, whoa! I don't know how could I possibly missed this. I've been up and down the methods and properties chart numerous times and I just didn't see it coming.
Anyhow. Thanks a lot, that was EXACTLY I was looking for!
30 Mar 2013 4:36 AM #4
31 Jan 2014 3:05 PM #5
I was wondering if there is "query" that traverses upwards.