Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic multiple images in a box ? (Read 5073 times)
Chris
YaBB Newbies
*
Offline



Posts: 3
Joined: Aug 9th, 2005
multiple images in a box ?
Aug 11th, 2005 at 9:15am
Print Post  
I use FC.NET version 3.2. I need to show several icons on the right side of a box, but the Box.Picture property allows only for one image. Is there any way to display more images in a box?

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: multiple images in a box ?
Reply #1 - Aug 11th, 2005 at 1:30pm
Print Post  
Have you considered using tables instead of boxes? Each cell of a Table node can have its own text and a picture. If you absolutely have to use boxes, try attaching the icons using auxiliary boxes attached to the main one. I.e. for each icon:

- create a new box using the CreateBox method
- set box.Transparent to true so the border lines are not displayed
- assign the icon image to box.Picture
- set the box BoundingRect to where you need the icon displayed
- call the AttachTo method to make the icon box stick to the main box

I hope this helps
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: multiple images in a box ?
Reply #2 - Aug 11th, 2005 at 1:36pm
Print Post  
On the other hand, you could create a single-column table to contain the icons and attach it to the box, instead of creating several auxiliary boxes and attach them all. To hide the table's frame lines and interior fill, set all color properties to transparent colors (having Alpha value = 0).
  
Back to top
 
IP Logged
 
Guest
Guest


Re: multiple images in a box ?
Reply #3 - Aug 11th, 2005 at 5:09pm
Print Post  
Hi,

It is much better to use custom drawing for that. Set CustomDraw to cdAdditional and handle the DrawBox event to draw the icons:

void flowChart1_DrawBox(...BoxDrawArgs e)
{
  e.Graphics.DrawImage(image1, x1, y1);
  e.Graphics.DrawImage(image2, x2, y2);
  // etc
}

This way you have less items in the diagram to worry about and the diagram files are much smaller because the icons are not saved with each box.

Stefan
  
Back to top
 
IP Logged
 
Chris
YaBB Newbies
*
Offline



Posts: 3
Joined: Aug 9th, 2005
Re: multiple images in a box ?
Reply #4 - Aug 12th, 2005 at 5:11am
Print Post  
Thank you guys, I guess I'll use custom drawing.
  
Back to top
 
IP Logged
 
Leonardo
Guest


Re: multiple images in a box ?
Reply #5 - Sep 19th, 2005 at 2:50pm
Print Post  
Hello

I solved this problem by creating a base picture and then attach the other pictures in execution time depending in the images that I need to show.

The only thing is that I’m not really sure if the performance con be affected, but it work’s fine for me.

If you want I can bring you my code.

I hope this helps.

Suerte.

Leonardo
  
Back to top
 
IP Logged
 
Chris
YaBB Newbies
*
Offline



Posts: 3
Joined: Aug 9th, 2005
Re: multiple images in a box ?
Reply #6 - Sep 22nd, 2005 at 9:54am
Print Post  
Leonardo, If I am to use the low level Graphics APIs I would rather do that in the DrawBox handler, instead of drawing dynamically generated images. Nevertheless, thank you for the suggestion!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint