How to adress settab() in a container

Discuss problems and solutions.
Post Reply
trhqx
Newbie
Posts: 6
Joined: 16 Jan 2013 09:20

How to adress settab() in a container

Post by trhqx »

Hej,

I have following problem:
I want to adress settab() (changed by a script inside a CustomButton) of a container inside of another container.

If the CustomButton executing the script and the container are on the same level it can simply be adressed by settab(container, INT). But if the container is inside another container I don't know what to write for [containerpath] as in settab([containerpath], INT)...

another problem related to the above issue is, that I also don't know how to get the message out of a container. Imagine a CustomButton inside a Container which should change the tab of a container inside a third container.
like in |[[Custombutton]] [[tabbed Container]]|

Has anyone an idea?
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: How to adress settab() in a container

Post by Softcore »

Its selecttab not settab! ;)

You can adress ANY object inside the hierarchy-tree structure like so.......

lets say we have container3 inside container2 inside container1. To select a tab of container3 with a button outside the containers, you type in your script:

Code: Select all

selecttab(container1.container2.container3, x);
You always have to adress objects further down the tree structure, starting from the object the script resides in, so for example if your button resides in Container1 you can type:

Code: Select all

selecttab(container2.container3, x);
I hope this helps what you are after....Also, if a button that changes the tabs is INSIDE the tab which is going to disappear it may be a good practise to disable "capture" or activate the selecttab on x reaching to zero......the case being, we dont want a cursor "trapped" onto that button as soon as you press it and it disappears from view.

;)
Post Reply