PDA

View Full Version : Why does `ScrollLayout` move the window


th0rse
11-02-2009, 06:24 PM
Hello there,

I'm creating an interface and I have a question for you all.

Let's say that I create a window, then I move the window, and finally I add a scrollLayout
Does anybody know why the window moves when I do that last thing?

window myWindow;
showWindow myWindow;


scrollLayout -p myWindow;

I know that I can add the `scrollLayout` before showing the window but I do not want to do that because in the script that I have, I have different Layouts for the same window and Depending on what you select from a menu, one layout is deleted and another is shown without deleting the window. (One of those layouts have the `scrollList` and the other doesn't)

That means that every time that I change the menu, the window moves a little bit.
I'm editing the window properties so it snaps back to the place where I want but that means that for a micro second is moving to another place and it's just disturbing!

Any ideas about how to fix that?


Many thanks,

Dave

ewerybody
11-03-2009, 08:23 AM
what about creating the layouts before and embedd them in a tablayout? You can even hide the tabs and switch it as you like.

th0rse
11-03-2009, 11:21 AM
In fact, I think that if I create both in the same layout and all what I do is change the visibility instead of deleting them every time, I should be able to make it work, right?

I will try that later


Thanks Eric!

ewerybody
11-03-2009, 11:57 AM
if you have just 2 different layouts with a few controls changing visibility will fit your needs.
But If you're going for much more, layouts embedded in tabs is the most straightforward way.

CGTalk Moderation
11-03-2009, 11:57 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.