On 5 Aug 2012, at 19:05, Herman wrote:

> The fastest way is to derive your own group and override the default 
> resize method:
> 
> class myGroup: public Fl_Group
> {
>   public:
> 
>   myGroup(int X, int Y, int W, int H,const char* 
> L=""):Fl_Group(X,Y,W,H,L) {}
> 
>   void resize(int X, int Y, int W, int H)
>   {  // first resize as usual
>      Fl_Group::resize(X,Y,W,H);
>      // now make sure that the console is not smaller than the minimal        
>      // height by resizing tree and viewer accordingly
>      if (...) {...}
>   }
> };
> 
> That should do the trick.
> 

I was going to say that ::size_range(...); is the thing you'd want, but 
checking the docs it looks like that only works for top level windows... Who 
knew?

So Herman's approach, or something similar for your use case, may be the best 
bet.

I've kinda done that before too, since for something "special" (like a terminal 
console window) I'd be deriving from the base widgets anyway so adding extra 
handling isn't that big of an issue...







_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to