Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Creating a Listbox with selectable boxes (Read 1590 times)
Dirk Woelfel
Guest


Creating a Listbox with selectable boxes
Jul 31st, 2006 at 8:59am
Print Post  
Hello,

How would I go about creating a Listbox with all the boxes a user could use in my program.

I would like to use a design similar to the Flowcharter example. But I donīt like to use shape templates, because some of the boxes could be of type image. So I need an example which handles with all boxes (shapes and images).

Any idea?

Thanks,
Dirk
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Creating a Listbox with selectable boxes
Reply #1 - Jul 31st, 2006 at 10:59am
Print Post  
Hello,

That example just draws boxes in an offscreen flowchart and copies the resulting images to the listbox. So instead of ShapeTemplates, you can set the Image property of the offscreen boxes - the images will appear in the listbox too.

- glavcho
  
Back to top
 
IP Logged
 
Dirk Woelfel
Guest


Re: Creating a Listbox with selectable boxes
Reply #2 - Jul 31st, 2006 at 11:06am
Print Post  
So, I would have to build up an array/collection of boxes (inside the flowchart-control), configure them to my wishes (color, style, image...) and use them as resource for filling the listview....? Right?

Thanks,
Dirk
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Creating a Listbox with selectable boxes
Reply #3 - Jul 31st, 2006 at 12:10pm
Print Post  
You could create a diagram file that contains all shapes and icons you wish to appear in the list box. E.g. you could use the FCDemo sample to draw the boxes and set their Image and Color properties, then save the file using the File\Save command. Then your application can use that file as kind of a palette definition resource. Upon startup load the file in a hidden flowchart, and for each box in the chart create an entry in the list box image-list. Use the Box.Draw method to draw each palette box in its corresponding image-list item Graphics object.

HTH
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint