[Iup-users] no scrollbars (matrix)

Antonio Scuri scuri at tecgraf.puc-rio.br
Wed Oct 31 09:05:32 GMT+3 2007


> if I have a matrix directly inside a dialog, when resizing 
> the dialog smaller than the matrix, I get scrollbars,

  In fact the dialog is not smaller than the matrix. The matrix is smaller
than the size needed by the number of visible lines/columns. Then the matrix
scrollbars will be displayed.

  
> if I place the matrix inside a h/vbox,  ie, doing normal 
> 'layout stuff', I dont get scrollbars anymore.
> Can I get scrollbars on the matrix, or one of its parent container ??

 Yes you can.

 When you add the matrix to a h/vbox the layout is different from simply
using the matrix as child. It will try to fit the box size to its contents.

 When the size of the dialog is smaller than the contents, it will only be
able to resize it to smaller values if the matrix size is not set by the
application.

 I mean if you set the SIZE or RASTERSIZE attributes they also work as
minimum size constrains.

 If you want to use some size as the initial size and then be able to resize
it to smaller values than that, then you must reset the matrix size after
the dialog is displayed, doing "mat.size = nil" for instance.

 Abstract layout is very useful but can be confusing. Let me know if you
could solve your problem.

 It also helps when you build a very simple test in Lua to demonstrate
what's going on.

Best Regards,
Antonio Scuri


 




More information about the iup-users mailing list