From: Gladys on 4 Apr 2010 15:19 Hi everybody, i have a problem creating a owner drawn ListBox. I need a ListBox that accepts graphic icons (.ico) files between the text (e.g. some text [myIcon.ico] more text and then another icon [myIcon.ico] and some text ) So i I am assuming that this is only possible creating a owner drawn ListBox. I'm a beginner, so an simple example would be nice. Thanks in advance, Gladys
From: Toidy on 4 Apr 2010 19:01 You might want to look at this http://www.c-sharpcorner.com/UploadFile/vasu/OwnerDrawListBoxWithIcons11212005071009AM/OwnerDrawListBoxWithIcons.aspx and http://www.devx.com/dotnet/Article/8014/0/page/2 On Apr 4, 2:19 pm, "Gladys" <Gla...(a)nomail.nospam> wrote: > Hi everybody, i have a problem creating a owner drawn ListBox. > > I need a ListBox that accepts graphic icons (.ico) files between the text > (e.g. some text [myIcon.ico] more text and then another icon [myIcon.ico] > and some text ) > So i I am assuming that this is only possible creating a owner drawn > ListBox. > I'm a beginner, so an simple example would be nice. > > Thanks in advance, > > Gladys
From: Gladys on 5 Apr 2010 09:17 Toidy, >You might want to look at this >http://www.c-sharpcorner.com/UploadFile/vasu/OwnerDrawListBoxWithIcons11212005071009AM/OwnerDrawListBoxWithIcons.aspx This example (I had already found this example) is still very unclear/complicated to me. My project has one listbox, three textboxes, a button and an imagelist with one icon file. The only thing i want to do (difficult enough for me) is add the text from textbox1, textbox2 and textbox3 to the listbox, all text parts separted by an icon from the imagelist. I tried to adapt this example for my purpose, but it always failed. I would appreciate a simpler example if possible. http://www.devx.com/dotnet/Article/8014/0/page/2 This example seems to be VB.NET and not C#. (I had already found this example also) Thanks in advance, Gladys
From: Jeff Johnson on 5 Apr 2010 09:47 "Gladys" <Gladys(a)nomail.nospam> wrote in message news:OZCQJvC1KHA.5996(a)TK2MSFTNGP05.phx.gbl... > Hi everybody, i have a problem creating a owner drawn ListBox. > > I need a ListBox that accepts graphic icons (.ico) files between the text > (e.g. some text [myIcon.ico] more text and then another icon > [myIcon.ico] and some text ) > So i I am assuming that this is only possible creating a owner drawn > ListBox. > I'm a beginner, so an simple example would be nice. My first question is "Do you have enough experience with the Graphics object to draw what you want on, say, a PictureBox?" Because I'd say that's a prerequisite for using OwnerDraw.
From: Peter Duniho on 5 Apr 2010 11:45 Jeff Johnson wrote: > My first question is "Do you have enough experience with the Graphics object > to draw what you want on, say, a PictureBox?" Because I'd say that's a > prerequisite for using OwnerDraw. Agreed. With the minor nit to pick, that using a PictureBox as the base implementation just for an arbitrary custom control is usually not advantageous. Most custom controls should just inherit Control. Pete
|
Next
|
Last
Pages: 1 2 3 Prev: Adding images to a checkedListBox Next: Sending MSMQ from MFC based code |