Print Page | Close Window

Popupcontrol cannot associate imageManager.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=6191
Printed Date: 17 November 2024 at 3:42am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Popupcontrol cannot associate imageManager.
Posted By: gbrix
Subject: Popupcontrol cannot associate imageManager.
Date 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



Replies:
Posted By: Oleg
Date Posted: 23 January 2007 at 11:29am
Hi,
 
Afraid this method appeared after 9.81 release.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: gbrix
Date Posted: 23 January 2007 at 12:14pm
thanks.
I will upgrade to the latest .
How it;s done in the latest vb6 code?
 
Thanks


Posted By: gbrix
Date 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


Posted By: jcollier
Date 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


Posted By: jcollier
Date Posted: 23 January 2007 at 12:49pm
Actually, you don't need the

Dim PopupControl As CommandBarPopup

line in the CreatePopup procedure.


Posted By: jcollier
Date 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.


Posted By: gbrix
Date 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
 
 


Posted By: Oleg
Date Posted: 24 January 2007 at 8:35am
Hello,
just assign Icons property:
 
 
Set Popup.Icons = ImageManager.Icons.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net