![]() |
Popupcontrol cannot associate imageManager. |
Post Reply
|
| Author | |
gbrix
Newbie
Joined: 10 October 2006 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Topic: Popupcontrol cannot associate imageManager.Posted: 23 January 2007 at 7:45am |
|
Hi there,
I am using 9.81 version and I want to associate some icons to a popup control.In the examples provided it's always loaded from a file.
I need to use either an imageList or codeJock ImageManager.
Could somebody show me in code how you do it ?
I have added an image to ImageManager with an index of 2
How do i set the icon?
Thanks alot
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 January 2007 at 11:29am |
|
Hi,
Afraid this method appeared after 9.81 release.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
gbrix
Newbie
Joined: 10 October 2006 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 January 2007 at 12:14pm |
|
thanks.
I will upgrade to the latest .
How it;s done in the latest vb6 code?
Thanks
|
|
![]() |
|
gbrix
Newbie
Joined: 10 October 2006 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 January 2007 at 12:37pm |
|
Hi,
I have installed 10.3 Ihave a popup control and imagemanager with an icon with an index =2.
How do i make it work?
Item.SetIcon ????????
Thanks a lot in advance
|
|
![]() |
|
jcollier
Senior Member
Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 January 2007 at 12:48pm |
|
General Declarations
Option Explicit Dim Popup As CommandBar 'load icons into image manager with the corresponding id numbers Private Const ID_DESPECKLE = 1 Private Const ID_REMOVELINES = 2 Private Sub CreatePopup Dim Control As CommandBarControl Dim PopupControl As CommandBarPopup 'name of the control placed on the form is CommandBars Set Popup = CommandBars.Add("Popup", xtpBarPopup) With Popup.Controls Set Control = .Add(xtpControlButton, ID_DESPECKLE, "Despeckle", -1, False) Set Control = .Add(xtpControlButton, ID_REMOVELINES, "Remove Lines", -1, False) end with CommandBars.Icons = ImageManager.Icons End Sub Private Sub Form_Load() Call CreatePopup End Sub |
|
![]() |
|
jcollier
Senior Member
Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 January 2007 at 12:49pm |
|
Actually, you don't need the
Dim PopupControl As CommandBarPopup line in the CreatePopup procedure. |
|
![]() |
|
jcollier
Senior Member
Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 January 2007 at 12:52pm |
|
Oops. I think I misunderstood. You're not using PopupMenu but popup control instead? Wow. I guess I need to go eat lunch to recharge the batteries.
|
|
![]() |
|
gbrix
Newbie
Joined: 10 October 2006 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 January 2007 at 6:12am |
|
Thanks for your reply.Yes I am using a popupcontrol that is how they call it.
It seems bit useless to me if I cannot attach to either an imagelist or ImageManager.In the real world you would never attach to a file.
Any more suggestions?
Thanks
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 January 2007 at 8:35am |
|
Hello,
just assign Icons property:
Set Popup.Icons = ImageManager.Icons.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |