I think the problem may be occurring because of the following which I don't
understand:

I have a iuptabs control that starts off with a size of 776x361 clientsize
(which is the same as either matrix rastersize.) I have 2 matrix controls
in the 2 tabs and I resize its rows and columns as follows:

matA has 2 rows (including title) and 2 columns (no column title). Title
row rasterheight = 10 (fixed) row 1 rasterheight = 333 (adjusted to occupy
the remaining height of the matrix). This should give the total matrix
height of 333+10+2*8+2 = 361 which matches the height of the matrix. (2 is
for the border and 8 for the cell decorations)

matA has 2 columns with no title. Both columns are distributed the space
equally. So their rasterwidth is set to 379 both. That should give the
total matrix width of:
    379*2+2*8+2 = 776  which matches the width of the matrix

matC has 2 rows same as matA and they are given the same size of 10 and 333

matC has 3 columns. 1st column is fixed at 12 the remaining 2 columns get
the space equally and are set to 369. This should give the matrix width of:
   369*2+8*3+12+2 = 776 which matches the width of the matrix

*After these sizings happen the natural size and rastersize of matA changes
to  850x376 and the natural size of matC changes to 791x376 while its
rastersize if 850x376. The iuptabs natural size and rastersize changes to
858x407*

I don't understand why does the natural and rastersize of the matrix
elements and iuptabs change when I resize the columns to precisely fit in
their current rastersize? Am I calculating something wrong here?

Thanks for any help.

Milind


On Tue, Jun 16, 2015 at 11:41 PM, Milind Gupta <milind.gu...@gmail.com>
wrote:

> Hi,
>         I have this sample attached. The aim is to resize the matrix
> columns and cells automatically depending on the weight assigned to the
> columns whenever the dialog is resized. The sizing algorithm works fine
> when I trace the steps of the sizes allotted to different columns.
>         The problem is that after a few resize iterations the iuptab size
> suddenly becomes larger than the dialog clientsize. I am not able to
> explain that and that causes the automatic resizing of the matrix not to
> work as intended.
>         I would really appreciate any help as to why the tabs size
> increases beyond the dialog client size.
>
> Thanks,
> Milind
>
>
------------------------------------------------------------------------------
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to