Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with styling toolbar
#1
Hi, I've created a toolbar and positioned it and it's working great but I'm having trouble with changing it's appearance. Please can I have some simple example code for changing the toolbar size and also changing the toolbar's font attributes (font name, font size, making font bold).  I know it's simple but I don't know the correct syntax to use!
#2
You can change these attributes when you create a new toolbar instance:
 
Code:
Copy      Help
var t = new toolbar {
    Font = new FontNSS(Size: 14, Name: "Consolas", Bold: true),
    Size = new(100, 100),
    TextColor = new(0xFFFFFF, true),
    BorderColor = new (0x000000, true)
};

or afterwards:
 
Code:
Copy      Help
var t = new toolbar();

t.Font = new FontNSS(Size: 14, Name: "Consolas");
t.Size = new(100, 100);
t.TextColor = new(0xFFFFFF, true);
#3
Thank you, that's great, I've styled it correctly now. The last thing I need to work out is how to have the popup menu on my toolbar always visible. Do you know if that's possible? (one of the buttons on my toolbar is a menu but I'd like that to be open/visible by default rather than having to click the button to show it).  Any help greatly appreciated!


Forum Jump:


Users browsing this thread: 2 Guest(s)