Print Page | Close Window

Question about ListBox

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=12982
Printed Date: 28 September 2024 at 9:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Question about ListBox
Posted By: Kamand.Jirbande
Subject: Question about ListBox
Date Posted: 20 December 2008 at 1:56am
Hi,
Anyone knows how can I load icons to ListBox from ImageList or ImageManager?
I don't wanna load icons from disk or resources.
If anyone have a sample, please give me. Thanks:)
 
I add items like this:
 
       ListBoxMarkup.AddItem "<Border BorderThickness='2' BorderBrush='DodgerBlue' Margin='0, 2, 0, 2' Padding='3'><StackPanel Orientation='Horizontal'>" & _
       "<Image Source='30'/>" & _
       "<Grid><Grid.ColumnDefinitions><ColumnDefinition Width='Auto'/><ColumnDefinition Width='*'/></Grid.ColumnDefinitions>" & _
       "<Grid.RowDefinitions><RowDefinition/><RowDefinition/></Grid.RowDefinitions>" & _
       "<TextBlock TextAlignment='Right' FontWeight='Bold' Foreground='Navy' Text='IP:'/>" & _
       "<TextBlock TextAlignment='Right' Grid.Row='1' FontWeight='Bold' Foreground='Navy' Text='Country:'/>" & _
       "<TextBlock Margin='6, 0, 0, 0' Grid.Column='1' Text='" & MyResult(0) & "'/>" & _
       "<TextBlock Margin='6, 0, 0, 0'  Grid.Column='1' Grid.Row='1'  Text='" & "Loopback" & "'/>" & _
       "</Grid></StackPanel></Border>"



Replies:
Posted By: Oleg
Date Posted: 22 December 2008 at 1:42am
Hi,
 
Add ImageManager to form, add icons in design time and in code add
 
XtremeSuiteControls.Icons.AddIcons YourImageManager.Icons


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


Posted By: nighthawk
Date Posted: 01 January 2009 at 9:36pm
When using the AddIcons function, does it create a copy of icons from the ImageManager or does it just create a pointer to the icons.  The reason I ask is that I have one ImageManager with all my icons that I use for the CommandBars, ReportControl, SuiteControls, etc.  I don't want to have a seperate copy of the icons in memory for each type of control.

Also, why doesn't the following work on the global settings object:

Set XtremeSuiteControls.Icons = MyImageManager.Icons

The code above gives me an error but it works if set it to an individual control such as:

Set objReportControl.Icons = MyImageManager.Icons


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0


Posted By: Oleg
Date Posted: 05 January 2009 at 2:05am
Hello,
 
AddIcons will copy icons. BUt our ImageManager hold all icons in single bitmap so it will not create additional GDI Handlers.


-------------
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