In Theme Builder, I set combobox’s default.properties.height to 30. When I dropped it in a form, the Size property defaults to 30, which is what I expected, but it is cutoff as shown in image. I can only see it in full if I set the size manually to 32.
Also, take note of the controls’ sizes at design-time and runtime. It seems the controls’ sizes change at runtime. In WinForms, controls’ sizes don’t change as also shown in the image.
When I drop the combobox, the default properties are:
AutoSize = True
Font = @default, 13px, Regular
Size.Height = 30
At runtime, the height looks bigger than the textbox to the right of the combobox. Please see the attached project I am playing with.
By the way, I’ve also noticed something about Label when adding a Height property in the Theme Builder. I’ll send it later.
Actually no, let me correct my last statement. Even if AutoSize=false and the height is smaller than the theme height, Wisej resizes the control correctly. The bottom part gets truncated only if the height is smaller than the internal elements, in the combobox case it’s the button which has a minimum height.
What is the font of the page/form? I found a potential problem in the calculation of the preferred height but I can’t reproduce this specific issue.
This is how the system calculates the height of controls:
The problem you are seeing means that the theme height is bigger than the control’s height, which is impossible since the property PreferredHeight always returns the biggest height and that is what is used when AutoSize = true.
The only way I can reproduce this problem is by setting AutoSize=false and a height that is smaller than the height set in the theme.
Can you please check if you have AutoSize=false and also the font please?
You are correct that size doesn’t change at runtime. The runtime screenshot was taken from Chrome zoomed at 125%. Didn’t know and notice that it was set like that. Sorry for the false alarm
But the issue for combobox (logged as WJ-7347) is still the same.
Thank you. Logged as WJ-7347.
The size doesn’t change at runtime. The difference that you see is that at design time the panting rectangle is cropped to the size of the control while at runtime a control can render its HTML outside of the element. At design time we actually paint the control from the rendered HTML while at runtime it’s only HMTL.
This allows you to use rotations and transformations without having to recalculate the size of the control.
Please login first to submit.