|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionI've always enjoyed using a control that behaves like the OutlookBar in Outlook. After testing and creating this, I knew that if I wanted other people to work intuitively with my programs, the OutlookBar control must look and work like the one in Outlook. Needed propertiesThe control must be functional and accessible during runtime, as well as in design mode. You can resize the control in design time, so you can choose which buttons will be displayed as large buttons. The buttons can be added and changed using a collection editor. During runtime, the At runtime, mouse movements must cause the buttons to repaint if needed. There are different color schemes for hovering buttons. I need large buttons and small buttons, displayed in the correct order even after resizing the control. I also want to be able to set a button in a "not allowed" state. Depending on the user of your program, you can disable certain buttons. The difference between Allowed and Enabled is that with the Allowed property set to False, you cannot see the button. Basic structureThere are three classes in this control: Class OutlookBarButtonThis represents the instances of the separate buttons. No painting occurs in this class. The basic members of this class are:
Class OutlookBarButtonCollectionRepresenting the collection of buttons on the control, this inherits from Dim newButton as New Altea.OutlookBarButton
With newButton
.Text="my button"
.Visible=False
.Image=My.Resources.myImage
End With
me.OutlookBar1.Buttons.Add(newButton)
Or using the overloaded constructor: Me.OutlookBar1.Buttons.Add(New Altea.OutlookBarButton("my button",
My.Resources.myImage))
Class OutlookBarInheriting from Me.OutlookBar1.Buttons("Journal").Selected = True
This class has the most events. Events such as Friend Enum ButtonState
Passive
Hovering
Selected
End Enum
The ConclusionTry it, run it and tell me about it! History
|
||||||||||||||||||||||||