Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / October 2004

Tip: Looking for answers? Try searching our database.

ImageIndex Designer?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin Welch - 25 Oct 2004 15:48 GMT
The ToolBarButton class has an ImageIndex property which presents a drop
down combo with the images from the parent ToolBar's ImageList.

I have a component with an ImageList and I want my ImageIndex property to
behave the same way as the ToolBarButton.

Does anyone know how?

Cheers!

Martin
Mick Doherty - 27 Oct 2004 22:31 GMT
\\\
Private m_Imagelist As ImageList = Nothing
Private m_ImageIndex As Integer = -1

'ImageList
<Category("Appearance"), DefaultValue(GetType(ImageList), Nothing)> _
Public Property ImageList() As ImageList
   Get
       Return m_Imagelist
   End Get
   Set(ByVal Value As ImageList)
       m_Imagelist = Value
   End Set
End Property

'ImageIndex
<Category("Appearance"), DefaultValue(-1), _
TypeConverter(GetType(ImageIndexConverter)), _
Editor("System.Windows.Forms.Design.ImageIndexEditor, System.Design", _
GetType(System.Drawing.Design.UITypeEditor))> _
Public Property ImageIndex() As Integer
   Get
       If m_Imagelist Is Nothing Then
           m_ImageIndex = -1
       End If
       Return m_ImageIndex
   End Get
   Set(ByVal Value As Integer)
       m_ImageIndex = Value
   End Set
End Property
///

Signature

Mick Doherty
http://dotnetrix.co.uk/nothing.html

> The ToolBarButton class has an ImageIndex property which presents a drop
> down combo with the images from the parent ToolBar's ImageList.
[quoted text clipped - 7 lines]
>
> Martin
Martin Welch - 28 Oct 2004 10:05 GMT
Brilliant!

Thanks very much, Mick.

Martin.

> \\\
> Private m_Imagelist As ImageList = Nothing
[quoted text clipped - 45 lines]
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.782 / Virus Database: 528 - Release Date: 22/10/2004

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.