Posts: 2
Threads: 1
Joined: Mar 2023
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!
Posts: 36
Threads: 21
Joined: Mar 2022
You can change these attributes when you create a new toolbar instance:
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:
var t = new toolbar();
t.Font = new FontNSS(Size: 14, Name: "Consolas");
t.Size = new(100, 100);
t.TextColor = new(0xFFFFFF, true);
Posts: 2
Threads: 1
Joined: Mar 2023
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!