Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic stretched objects ind ShapeList (Read 3461 times)
Alex
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Nov 21st, 2006
stretched objects ind ShapeList
Feb 26th, 2007 at 1:40pm
Print Post  
Hello,

I have two questions concerning the ShapeList.

1. The objects seem a little bit stretched when drawn in the ShapeList. Dragging them to the flowchart reveals that they indeed have a different shape, i.e. originally it is a circle, but in the ShapeList it looks like an flattened ellipse.

2. Is it possible to colorize the objects in the shapeList differently (one blue, one green etc.)?

Best regards,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: stretched objects ind ShapeList
Reply #1 - Feb 26th, 2007 at 2:26pm
Print Post  
Hello Alex,

Quote:
1. The objects seem a little bit stretched when drawn in the ShapeList. Dragging them to the flowchart reveals that they indeed have a different shape, i.e. originally it is a circle, but in the ShapeList it looks like an flattened ellipse.


You should assign to IconSize and IconMargin values that make the icon width and height the same.

Quote:
2. Is it possible to colorize the objects in the shapeList differently (one blue, one green etc.)?


It's possible, though using a hack - the Control.Items property for ShapeListBox contains Box obects - you can access the boxes corresponding to the list shapes and set their FillColor or Brush. Our developers did not want to give access to the internal Box objects, so the overloaded ShapeListBox.Items property will throw an exception. But you can still access the Items of the base Control class by casting the ShapeListBox instance. It should be safe to access the boxes if you will only change their appearance - e.g. Text, Image, Brush, FrameColor, etc.

I hope that helps,
Stoyan
« Last Edit: Feb 27th, 2007 at 5:47am by Stoyo »  
Back to top
 
IP Logged
 
Alex
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Nov 21st, 2006
Re: stretched objects ind ShapeList
Reply #2 - Feb 27th, 2007 at 7:27am
Print Post  
Hello again,

the first problem solved, and second works with a cast to ListBox. Little bit tricky since I only looked in the Control class first.

Thank you very much!

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: stretched objects ind ShapeList
Reply #3 - Feb 27th, 2007 at 7:37am
Print Post  
yes, casting to ListBox is what I've meant to say  Embarrassed
  
Back to top
 
IP Logged
 
Alex
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Nov 21st, 2006
Re: stretched objects ind ShapeList
Reply #4 - Feb 27th, 2007 at 7:45am
Print Post  
Another quick question:

If I assigned a color to the shapeListBox Items in this way, can you think of an easy way to keep this color when dragging this item to the flowchart?

Thank you in advance

Alex

PS: It takes a while, but I feel I'm getting to know the library better and better Smiley
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: stretched objects ind ShapeList
Reply #5 - Feb 27th, 2007 at 8:05am
Print Post  
You could handle ShapeListBox.ShapeSelected, and assign the color of the selected shape to FlowChart.BoxFillColor. The box created through drag-and-drop will be initialized with BoxFillColor.

It seems our developers have forgotten raising BoxCreated when boxes are created using the list box - it would be better to set the color from there.

Stoyan
  
Back to top
 
IP Logged
 
Alex
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Nov 21st, 2006
Re: stretched objects ind ShapeList
Reply #6 - Mar 13th, 2007 at 7:14am
Print Post  
Hallo again,

I tried to use the ShapeSelected event and it works to set the right color with one little problem. It seems that the ShapeSelected event is fired, when the MouseUp event occurs in the ShapeListBox, which leads to simple problem: If the user clicks on a symbol in the ShapeListBox and directly drags them to the diagramm, the ShapeSelected event is fired too late.

Any ideas to circumvent this problem?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: stretched objects ind ShapeList
Reply #7 - Mar 13th, 2007 at 8:33am
Print Post  
We have already changed this to raise BoxCreated after dragging a shape from the list box. Contact us by email and we'll send you the latest build of the dlls.

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