Choose between dotnetbar styles

Posts 1–7 of 7 · Page 1 of 1
Choose between dotnetbar styles
Hi,

How can i make the user of my program be able to change the style of dotnetbar with a dropdownbox like this?

Whenever the user change style the style of dotnetbar should change.
Styles i wanna use:
Office 2010 silver
Office 2010 blue
Office 2010 black
Windows 7 blue

Thanks
~Abstract
Code:
Select Case ComboBox1.Text

Case "Blue"

StyleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2007Blue

End Select
...basics
Better would be If you add a Button and a ColorDialog Bar then add this code to Button:

Code:
Dim Bcolor As New ColorDialog()
        Bcolor.ShowDialog()
        Me.BackColor = Bcolor.Color
That would have more Colors.
Quote Originally Posted by Sydney View Post
Better would be If you add a Button and a ColorDialog Bar then add this code to Button:

Code:
Dim Bcolor As New ColorDialog()
        Bcolor.ShowDialog()
        Me.BackColor = Bcolor.Color
That would have more Colors.
-.- dotnetbar does not have millions of colors oO unless you edit each piece of color on a control <_< but thats not what he is asking
Quote Originally Posted by 'Bruno View Post
-.- dotnetbar does not have millions of colors oO unless you edit each piece of color on a control <_< but thats not what he is asking
ôO I meant with a button.
Without using DotNetBar -.-
That just would be better.
Yes but in THIS CASE we ARE using DotNetBar.
So please don't just ASSUME that he will change to what you say and not use DNB.
Well, its pretty simple... blubb1337 as already told you the code, but here is everithing that you need (just in case you didn't know):

A StyleManeger (it's in the DotNetBar components)
A ComboBox or a TextDropDownBox... You choose it...
And something where you'll see the result (ex.DotNetBar button)

Heres the code:

[php]Public Class Form1

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Select Case ComboBox1.Text

Case "Blue"

StyleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2007Blue

Case "Black"

StyleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2007Black

End Select

End Sub

End Class[/php] (It's bluub1337 code, I only added another case and put the hole code)
Now, just add the other cases...
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Talk with us