FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bug? SashForm.getWeights()

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT
View previous topic :: View next topic  
Author Message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Mon Dec 26, 2005 4:04 pm    Post subject: Bug? SashForm.getWeights() Reply with quote

getWeights() return 300 for 30 percent 700 for 70 percent etc. I.e. I need to divide by 100 to get the results in percents.

from SWT docs:
Quote:

getWeights

public int[] getWeights()

Answer the relative weight of each child in the SashForm. The weight represents the percent of the total width (if SashForm has Horizontal orientation) or total height (if SashForm has Vertical orientation) each control occupies. The weights are returned in order of the creation of the widgets (weight[0] corresponds to the weight of the first child created).
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Mon Dec 26, 2005 7:55 pm    Post subject: Reply with quote

Yes, this is the relative weight.
Back to top
View user's profile Send private message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Tue Dec 27, 2005 3:16 am    Post subject: Reply with quote

Yes, I understand. But the docs says it is *percent* relative to the total weight. Percent means 0 to 100... 0 to 1000 is ... i don't know the word in english (promil in bulgarian) but is not percent.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group