Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Popupcontrol cannot associate imageManager.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Popupcontrol cannot associate imageManager.

 Post Reply Post Reply
Author
Message
gbrix View Drop Down
Newbie
Newbie


Joined: 10 October 2006
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote gbrix Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2007 at 11:29am
Hi,
 
Afraid this method appeared after 9.81 release.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
gbrix View Drop Down
Newbie
Newbie


Joined: 10 October 2006
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote gbrix Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2007 at 12:14pm
thanks.
I will upgrade to the latest .
How it;s done in the latest vb6 code?
 
Thanks
Back to Top
gbrix View Drop Down
Newbie
Newbie


Joined: 10 October 2006
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote gbrix Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2007 at 12:49pm
Actually, you don't need the

Dim PopupControl As CommandBarPopup

line in the CreatePopup procedure.
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gbrix View Drop Down
Newbie
Newbie


Joined: 10 October 2006
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote gbrix Quote  Post ReplyReply Direct Link To This Post 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
 
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 January 2007 at 8:35am
Hello,
just assign Icons property:
 
 
Set Popup.Icons = ImageManager.Icons.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.233 seconds.