View previous topic :: View next topic |
Author |
Message |
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Dec 26, 2005 4:04 pm Post subject: Bug? SashForm.getWeights() |
|
|
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 |
|
|
Shawn Liu
Joined: 09 Mar 2005 Posts: 104 Location: Shanghai, China
|
Posted: Mon Dec 26, 2005 7:55 pm Post subject: |
|
|
Yes, this is the relative weight. |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Tue Dec 27, 2005 3:16 am Post subject: |
|
|
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 |
|
|
|