![]() |
Icons in Toolbar |
Post Reply ![]() |
Author | |
lexicon ![]() Groupie ![]() Joined: 26 January 2007 Status: Offline Points: 46 |
![]() ![]() ![]() ![]() ![]() Posted: 13 November 2007 at 7:10am |
Hello
I'm trying to understand how you are loading icons in your toolbar.
Let's say the example TabbedToolbar.vbp
Where are the icons come from?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
See
ImageManager.Icons.LoadIcon App.Path & "\Icons\App.ico", ID_TAB_ICON, xtpImageNormal
line.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
lexicon ![]() Groupie ![]() Joined: 26 January 2007 Status: Offline Points: 46 |
![]() ![]() ![]() ![]() ![]() |
I'm running this code and i take 2 toolbars
Dim ToolBar As CommandBar
Set ToolBar = CommandBars.Add("Standard", xtpBarTop) CommandBars.Options.LargeIcons = 1 AddControl ToolBar.Controls, xtpControlButton, 100, "&New", False, "Create a new document" AddControl ToolBar.Controls, xtpControlButton, 101, "&Open", False, "Open an existing document" AddControl ToolBar.Controls, xtpControlButton, 102, "&Save", False, "Save the active document" AddControl ToolBar.Controls, xtpControlButton, 103, "&Save All", False, "Save all documents" AddControl ToolBar.Controls, xtpControlButton, 104, "Cu&t", True, "Cut the selection and put it on the Clipboard" AddControl ToolBar.Controls, xtpControlButton, 105, "&Copy", False, "Copy the selection and put it on the Clipboard" ' AddControl ToolBar.Controls, xtpControlButton, ID_VIEW_PROPERTIES, "Properties", True ' AddControl ToolBar.Controls, xtpControlButton, ID_HELP_ABOUT, "About", True Set CommandBars.Icons = ImageManager.Icons CommandBars.Options.UseDisabledIcons = True UseDisabledIcons = True CommandBars.Options.SetIconSize True, 32, 32 CommandBars.Options.ShowExpandButtonAlways = False CommandBars.VisualTheme = xtpThemeOffice2003 Can you tell me how the first toolbar created?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
This code creates only one toolbar. check that you call it only once.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
lexicon ![]() Groupie ![]() Joined: 26 January 2007 Status: Offline Points: 46 |
![]() ![]() ![]() ![]() ![]() |
This is the code that creates 2 toolbars, the 1st is empty Private Sub Form_Load()
Dim ToolBar As CommandBar Set ToolBar = CommandBars.Add("Standard", xtpBarTop) CommandBars.Options.LargeIcons = 1 AddControl ToolBar.Controls, xtpControlButton, 100, "Κινήσεις", True AddControl ToolBar.Controls, xtpControlButton, 107, "Πελάτες", True AddControl ToolBar.Controls, xtpControlButton, 108, "Ταινίες", True AddControl ToolBar.Controls, xtpControlButton, 103, "Χρεώσεις", True AddControl ToolBar.Controls, xtpControlButton, 104, "Στατιστικά", True AddControl ToolBar.Controls, xtpControlButton, 105, "Κρατήσεις", True AddControl ToolBar.Controls, xtpControlButton, 106, "Οικονομικά", True AddControl ToolBar.Controls, xtpControlButton, 109, "Αποσύνδεση", True AddControl ToolBar.Controls, xtpControlButton, 110, "Ρυθμίσεις", True Set CommandBars.Icons = ImageManager.Icons CommandBars.Options.UseDisabledIcons = True UseDisabledIcons = True CommandBars.Options.SetIconSize True, 32, 32 CommandBars.Options.ShowExpandButtonAlways = False CommandBars.VisualTheme = xtpThemeOffice2003 End Sub
|
|
![]() |
|
ijwelch ![]() Senior Member ![]() Joined: 20 June 2006 Status: Offline Points: 262 |
![]() ![]() ![]() ![]() ![]() |
The first empty bar is the default 'menubar', created automatically.
You need to call CommandBars.DeleteAll at the start of your code to remove it. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |