Shortcutbar |
Post Reply |
Author | |
amstel
Newbie Joined: 23 February 2004 Location: France Status: Offline Points: 18 |
Post Options
Thanks(0)
Posted: 10 March 2004 at 8:45am |
How to add icons on shortcutbar ?? Thanks, |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Take a look at the Shortcutbar sample in the Common folder. The
ShortcutBar will display two different sized images depending on how
the shortcut is displayed. If the shortcut is grouped
individually it will use a 24x24 image. If the shortcut is
grouped together in on the bottom, then they will use a 16x16
image. You will add 2 ImageList controls to the form. Name
one of them imlShortcutBarIcons and change the height and width to 16,
Name the second ImageList imlShortcutBarIconsBig and change the height
and width to 24. You will need to right-click on each ImageList
control, select properties, and click on the Images tab and add some
images. The index of the image will be used to associate each
image with a shortcut in the ShortcutBar. The AddItem method of
the ShortcutBar control takes three parameters, the first is the Index
of the image in the ImageLists. The code below will illustrate
how to add three shortcuts to the ShortcutBar and associate an image to
them.
Dim Item As ShortcutBarItem Set ItemMail = wndShortcutBar.AddItem(1, "Mail", 0) Set Item = wndShortcutBar.AddItem(4, "Tasks", 0) Set Item = wndShortcutBar.AddItem(5, "Notes", 0) wndShortcutBar.AddImageList imlShortcutBarIcons wndShortcutBar.AddImageList imlShortcutBarIconsBig You will need to use the AddImageList method of the ShortcutBar control to add the 2 image lists added to the form. When specifying two ImageLists, one list must contain 16x16 images, the other must contain 24x24 images. The ShortcutBar control will automatically use the 16x16 ImageList for images in the shortcut menu grouping at the bottom of the control (red circle). The ShortcutBar control will then use the 24x24 ImageList for the expanded menu shortcuts (yellow circle). If only one ImageList is specified, those images will be used as both 16x16 and 24x24 images. If two ImageLists are loaded and are not 16x16 and 24x24, only the smaller of the two ImageLists will be used for both sets of images. Let me know if you need more helped. Edited by SuperMario |
|
cory
Groupie Joined: 31 August 2004 Location: Italy Status: Offline Points: 26 |
Post Options
Thanks(0)
|
I need to use my usercontrol imagelist but y have this error: 'run-time error 438: property or metod not supported' why? Thanks |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
What is the code you are using? You are using an ImageList you created yourself?
|
|
cory
Groupie Joined: 31 August 2004 Location: Italy Status: Offline Points: 26 |
Post Options
Thanks(0)
|
Yes i using an ImageList usercontrol created myself, at working normaly with other control. Probably I have not implemented all the property.
Edited by cory |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
I would suggest implementing all of the normal ImageList properties.
Note: In the next release, you will be able to use the ImageManager control to supply icons to the ShortcutBar. Just something to keep in mind. If implementing all the standard properties does not work, maybe post another sample for us to debug. |
|
cory
Groupie Joined: 31 August 2004 Location: Italy Status: Offline Points: 26 |
Post Options
Thanks(0)
|
cory
Groupie Joined: 31 August 2004 Location: Italy Status: Offline Points: 26 |
Post Options
Thanks(0)
|
Does anybody know how can i set up ShortcutBar Popup menu to use a different language? Tanks |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
To change language:
Just add this code to your application: SuiteControlsGlobalSettings.ResourceFile = App.Path & "XTPResourceDe.dll" Change App.Path to the path of the resource Dll, located by default in the bin\translations directory. |
|
cory
Groupie Joined: 31 August 2004 Location: Italy Status: Offline Points: 26 |
Post Options
Thanks(0)
|
Hello Supermario, you have some news for my problem with my usercontrol imagelist? Thanks in advance |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Not sure why it doesn't like your imagelist.
Maybe something like this: ShortcutBar1.Icons.AddIcon Me.XImgList1.ItemCopyOfIcon(1), 1, xtpImageNormal ShortcutBar1.Icons.AddIcon Me.XImgList1.ItemCopyOfIcon(2), 2, xtpImageNormal |
|
cory
Groupie Joined: 31 August 2004 Location: Italy Status: Offline Points: 26 |
Post Options
Thanks(0)
|
sorry but I don't have the collection "icons" in my shortcutbar (my version is 9.10) and so i can't add icons...or was just what u think will be implemented in the next versions? anyway, thank u |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Opps, I didn't realize that this wasn't in 9.10. Just wait until 9.5 comes out shortly.
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Have you tried the code I posted with the new release? Any more problems?
|
|
cory
Groupie Joined: 31 August 2004 Location: Italy Status: Offline Points: 26 |
Post Options
Thanks(0)
|
Thanks too much, Yes of course, I have installed the new release and everithing works fine! thank u |
|
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 |