Yep, PG_SZMODE_PERCENT always takes a percent of the actual available space.
There is another size mode designed to do exactly what you need:
PG_SZMODE_CNTFRACT takes the size as a fraction of the total container size. The
fraction is formed using the pgFraction(n,d) macro where n is the numerator and
d is the denominator. To put three buttons in one toolbar, you can set all of
theme to use the sizemode PG_SZMODE_CNTFRACT and the size pgFraction(1,3).

Quoting kitkat <[EMAIL PROTECTED]>:

> Hi folks,
> 
> I've some trouble with layoutmanagement for a more complex Dialog.
> I'm using the percent-sizemode and I've notized that each new created
> widget
> takes a percentage of the actual available space and not of the whole
> container space it's located in.
> So it's realy hard to divide a container into three parts (each 33% of
> space) to get three equal sized widgets in it. After adding a new widget
> I
> always have to calc the new persentage in respect of the allread added
> widget and the rest of available space.
> 
> Sample:
> 
> [Button][Button][Button]
>   33%     50%      100%
> 
> Thr result are three equal sized buttons.
> I would brefer to say:
> 
> [Button][Button][Button]
>   33%     33%      33%
> 
> This would be much easier to manage!
> 
> Any other opinions ?
> 
> Best regards, kitkat >:)
> 
> 
> 
> _______________________________________________
> Pgui-devel mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/pgui-devel
> 



--
Only you can prevent creeping featurism!

_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to