FLTK logo

Re: resize riddle

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: resize riddle matthiasm Oct 18, 2007  
 
On Oct 18, 2007, at 7:04 PM, Stan wrote:

>
> So what I'd like to do is make a widget (W) that I can plop
> into a group (G), so that when G resizes:
>    - W's size never changes
>    - Other things in G are resized proportionally as usual
>    - Neither G nor it's non-W contents (like xxx)
>      encroach on W
>
>   -------------------
>   |             G   |
>   |                 |
>   |                 |
>   |    -------      |
>   |    |  W  |  xxx |
>   |    |     |      |
>   |    -------      |
>   -------------------

I made this a bit more granualar to explain:

>   -------------------
>   |    :     :      |
>   |  A :  B  :   C  |
>   |    :     :      |
>   |....-------......|
>   |  D |  W  |   F  |
>   |    |     |      |
>   |....-------......|
>   |  H :  I  :   K  |
>   -------------------

Assuming horizontal resizing only for simplicity. You can make ABC  
into a group, DWF into another, and HIK as well. D becomes the  
resizable of DWF. Now W and F stay the same size always and no xxx  
inside F will get into W.

You can also put ADHBWI into one group, and CFK into another, and  
then make A the resizable of ADHBWI. W and I will now not resize  
anymore.

Or you put ABDW into a group with A as the resizable, CF into a  
group, and HI into a group. K needs no group. Now B will only resize  
vertically and D only horizontally.

The only thing that your can not do with the resizable setup that is  
standard in FLTK is to have D and F expand horizontally by 50% an W  
staying centered. For that, you will need to write your own "resize 
()" function (which luckily is virtual).


----
http://robowerk.com/
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.