V.2.9
ctlUniToolbarXP

Unicode toolbar with modern style, it is a container control so you can place other controls inside it.
>>Common properties

Some Properties/Methods:
AddItem / RemoveItem adds/removes a new item (image button, separator, drop down image button, static (non clickable) image, custom control, spacer)
Align alignment of the control (Top / Left / Right / Bottom)
BeginUpdate / EndUpdate use it when you have to make a long time-consuming update on the control
Faded gets/sets the background type of control
GetItemRect gets the item coordinates
ItemCustomControl gets/sets the item custom control reference
ItemEnabled gets/sets the item state
ItemPic gets/sets the item image
ItemPressed checks if the item is pressed
ItemTip gets/sets the item tip
Orientation gets/sets the orientation of the toolbar
Events:

Click - raised when an item is pressed, in this event you'll receive the "vKey" parameter used as key when you've added the item, the index of control in the toolbar and a boolean used to know if the dropdown arrow of a dropdown item has been pressed

How to use the control:
Insert buttons using the AddItem method then manage the Click event
AddItem method (definition):

Public Function AddItem( _
    iType As eUniToolBarXP_ItemType, _
    Optional oPic As StdPicture = Nothing, _
    Optional sTip As String = "", _
    Optional vKey As Variant, _
    Optional bEnabled As Boolean = True, _
    Optional bPressed As Boolean = False, _
    Optional oCustomControlRef As Object = Nothing, _
    Optional iSpacerSize As Long = -1&, _
    Optional sText As String = "") As Boolean

Parameters:
iType: one of the following values:

eUniToolBarXPItemType_Button -->
Normal Image Button
eUniToolBarXPItemtype_Separator -->
Vertical Separator
eUniToolBarXPItemType_ButtonDropDown -->
Drop Down Image Button
eUniToolBarXPItemType_Image -->
Non Clickable image
eUniToolBarXPItemType_CustomControl -->
Custom Control (like a textbox)
eUniToolBarXPItemType_Spacer -->
Blank Spacer
eUniToolBarXPItemType_Text -->
Text
oPic: picture to show for buttons, drop down buttons, images

you can use a sintax like this .AddItem (eUniToolBarXPItemType_Button, ctlImageBag1.GetPictureClone(2)) to retrieve Pictures from an ImageBag control
sTip: the button tip
vKey: the button key
bEnabled: is the button enabled?
bPressed: is the button a tristate button?

In order to make a tristate button just catch the
Click event and write .ItemPressed("mybutton") = Not ctlUniToolBarXP1.ItemPressed("mybutton")
oCustomControlRef: this is the reference of the custom control, used to align custom controls
iSpacerSize: the size of a spacer button
sText: the text of a piece of static text
http://www.hexagora.com
Wed, 14 May 2008 09:53:02 UT
Copyright 2003-10 by Lorenzi Davide