Next/Previous button padding

Topics related to the Krypton Navigator.

Moderators: Phil Wright, Chris Porter

Next/Previous button padding

Postby ChrisChambers » Mon Nov 16, 2009 10:33 pm

Hi guys,

I have a navigator control (Mode, Bar-Tab-Group), multiple tabs on a single line and I have Next/Previous buttons to scroll along the line when the tabs truncate the navigator. I want to try to add some padding to the right hand side of the buttons to push everything along by about 100 pixels, so I've set the StateCommon.Bar.ButtonEdgeOutside property to be 100. This certainly adds the required padding but it also appears to add padding to the top and botton of the control too. Interestingly there seems to be certain amount of leeway before padding is applied to the top of the control. In my case I can add about 20 pixels to the outside edge before the padding is applied to the top of the control (interesting that this is the same as the minimum bar height, might be a clue). So first of all, is this normal and expected? And second of all, am I using the right property to achieve my desired effect? It doesn't just happen in my application, it happens with the Navigator Playground too. I'm using version 2.5.1.

Thanks for your time.

Regards,

Chris Chambers.
ChrisChambers
 
Posts: 10
Joined: Mon Nov 16, 2009 10:25 pm

Re: Next/Previous button padding

Postby Phil Wright » Tue Nov 17, 2009 1:20 pm

The problem you have is that the ButtonEdgeOutside is a single value and effects the height as well as the padding before the first button spec. What you need is a value that only changes the right padding before the button spec. Unfortunately there is no such value that you can set. So I do not think you can achieve what you need without cheating.

You could add a button spec that contains an image that is transparent and has 1 pixel height and whatever pixel width you need. Set the button to disabled so it is not seen. That should do the trick.
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia


Return to Krypton Navigator

Who is online

Users browsing this forum: No registered users and 0 guests