Padding on Tabpages

0
0

Hello everyone,

I’m struggling with padding on tabpages(where the text name is) of a tabcontrol. I’m changing the value on design mode and it’s not working. Is this a bug? v2.2.52

I’m using the property TabControl>ItemSize>height and works fine, but TabControl>ItemSize>width does not apply the change. Please, help.

Thanks,

C

  • You must to post comments
0
0

The Padding property of the TabPage is for the padding of the TabPage, which is the container where you drop controls that go inside the TabPage. To set the size of the button use ItemSize. To change how the automatic side of the button is calculated use the SizeMode property.

  • Carlos Lino
    Hey Luca, thanks for replying. What you advise, it works BUT the text of the TabPage does not get centered, and there is no property for text alignment . Please, advise. Thanks.
  • Luca (ITG)
    Send a test case. It’s unclear what you are trying to do. The original question was about the size. Do you want to change the alignment? Setting the width makes no sense since the text is different. For the alignment it’s a theme property.
  • You must to post comments
0
0

Padding shows up in the theme, it’s in the drop down list in the Add Property dialog. It’s one of the common properties. It’s also documented in the theme concepts.

Members of a theme object don’t show up in intellisense because it’a a collection of json dynamic objects and intelisense cannot show .NET dynamic object properties.

In general it’s better to create a custom theme. It’s very easy and the theme builder tool helps a lot.

Properties in our themes are different than the styles. The styles section is based on CSS snd therefore limited and fully listed. Properties are unlimited since they can be defined in javascript at will, of any value, and in any number so it’s impossible to list all the possible properties other than the common ones. They are all clearly documented in the js sources in github as themeable:true.

HTH

 

  • You must to post comments
0
0

Luca,

See attachment. The first tabControl(red rectangle) has the tabPage property that I want. The second tabControl(red rectangle) has the normal tabPage as the way it comes by default. My inquiry was on how to apply left/right padding property to have extra space, but with your comment above, I see that applies for the controls are dropped on it, not for the tabPage text.

I just found out that to have the first tabPage as I want, I had to modify the theme in runtime as follow Application.Theme.Appearances.tabview.components[“page”].components[“button”].components[“label”].states[“horizontal”].properties.margin = new Padding(60, 0, 60, 0); Now, I see that there some properties that has to be changed on the theme since they don’t show up in the property tool, am I right? If so, how can I find info regarding how to modify the theme via coding? Sorry, If my question took another course.

Thanks in advance,

C.

Attachment
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.