[vwnc] wxWidgets? Re: Does Cincom give up the Desktop ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Changing the layout of a widget?

Carl Gundel
How can I change the layout of a widget without replacing the whole widget?  I need to be able to change the position of widgets after the window opens and without changing the state of the widgets.

-Carl Gundel
http://www.libertybasic.com
http://www.runbasic.com
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Changing the layout of a widget?

Michael Lucas-Smith-2
Get the layout object of the widget, eg:
        myWidgetLayout := (self widgetAt: #myWidget) container container layout

then you can change its state, eg:
        myWidgetLayout leftOffset: 5.

It is now moved, but you need to invalidate the damaged areas -- how you do that is up to you. The brute force approach is to refresh the whole window:
        self mainWindow refresh

On Jul 9, 2011, at 10:39 AM, Carl Gundel wrote:

> How can I change the layout of a widget without replacing the whole widget?  I need to be able to change the position of widgets after the window opens and without changing the state of the widgets.
>
> -Carl Gundel
> http://www.libertybasic.com
> http://www.runbasic.com
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
12