Page Index Toggle Pages: 1 [2] 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) Any VB.net sample? (Read 32963 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Any VB.net sample?
Reply #15 - Jul 27th, 2007 at 9:12am
Print Post  
You need it only if using the JavaApplet mode.

Stoyan
  
Back to top
 
IP Logged
 
ysliew
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jul 18th, 2007
Re: Any VB.net sample?
Reply #16 - Jul 30th, 2007 at 5:44am
Print Post  
Hi Stoyo,

Need your advice for the followings.

(i) The org chart do not show completely on the page, the right side of the chart is truncated.

(ii) When a parent node has more than 10 child nodes, what would be the best layout for display?

(iii) The nodes will be doubled when any nodes is clicked.

(iv) When I set arw.PenWidth = 0.4, it seems like the width of the arrows is not identical, some appears thinner than the others.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Any VB.net sample?
Reply #17 - Jul 30th, 2007 at 5:54am
Print Post  
Hi,

1. Call FitDocToObjects after arranging the chart.

2. Try TreeLayout.Type = Radial

3. Are you asking how to add new nodes when a node is clicked?

4. Try setting FlowChart.AntiAlias = None.

Stoyan
  
Back to top
 
IP Logged
 
ysliew
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jul 18th, 2007
Re: Any VB.net sample?
Reply #18 - Jul 30th, 2007 at 6:17am
Print Post  
Hi Stoyo,

(i) What value should I put for FitDocToObjects?

(ii) I would prefer the hierarchical layout instead of radical. Can the chart arrange the nodes vetrically? 1st child at top and the rest at bottom.

(iii) Nope, I mean whenever the box is clicked, every node will be duplicated, is this a default behavior? I have not defined any action in box clicked event.

(iv) Already set AntiAlias = None, still the same.

Kindly advise, thanks.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Any VB.net sample?
Reply #19 - Jul 30th, 2007 at 7:15am
Print Post  
Hi,

1. The FitDocToObjects argument specifies the size of the margin space left between the boxes and the chart borders. Call the method after arranging the boxes.

2. Yes, set the TreeLayout.Type to Bordered.

3. How it is duplicated? There appears a new box in the chart? Check if by chance you don't create it in the OnLoad postback handler.

4. I guess that might be some rounding error. Try using MeasureUnit = Pixel and integer coordinate and width values.

Stoyan
  
Back to top
 
IP Logged
 
ysliew
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jul 18th, 2007
Re: Any VB.net sample?
Reply #20 - Jul 30th, 2007 at 8:50am
Print Post  
Hi,

(i),(iii) Thanks.

(ii)
Quote:
TreeLayoutType.Cascading
Layout.TreeLayoutDirection.LeftToRight


How could I assign the position of the root node?

(iv) After setting MeasureUnit = Pixel, I found the scale of everything become smaller, I'm able to set the NodeDistance but how could I set for the distance between nodes in different levels?



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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Any VB.net sample?
Reply #21 - Jul 30th, 2007 at 10:30am
Print Post  
Hi,

Assign a new RectangleF to the root.BoundingRect. As for distance between nodes in different levels - there is a TreeLayout.LevelDistance property.

Stoyan
  
Back to top
 
IP Logged
 
ysliew
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jul 18th, 2007
Re: Any VB.net sample?
Reply #22 - Jul 31st, 2007 at 7:27am
Print Post  
Hi Stoyo,

Need your help again.

(i) Is there a function to move the whole chart to the center of the page when Direction is set to Layout.TreeLayoutDirection.LeftToRight ?

(ii) After setting FitDocToObjects, there are lots of blank space left on the screen, how could I maximize the backgroud of the Chart? Besides, after setting NodeDistance and LevelDistance, the vertical scrollbar exists and the chart doesn't shown completely. Are the following codes called in correct sequence?

Quote:
tl.NodeDistance = 20
tl.LevelDistance = 50
tl.Arrange(FlowChart1)
FlowChart1.AntiAlias = Drawing2D.SmoothingMode.None
FlowChart1.ExpandButtonAction = ExpandButtonAction.ExpandTreeBranch
FlowChart1.ExpandButtonPosition = ExpandButtonPosition.OuterLowerLeft
FlowChart1.FitDocToObjects(0.5)




(iii) How to resize the chart when the expand button is clicked?



(iv) If I set all the Box.Expanded = False, after clicking Expand button, the boxes will overlap.



(v) Is it possible to insert controls like Button, DropDownList into Boxes?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Any VB.net sample?
Reply #23 - Jul 31st, 2007 at 12:53pm
Print Post  
For 3 & 4, handle the TreeExpanded and TreeCollapsed events and in the event handlers rearrange the diagram and set the document bounds.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Any VB.net sample?
Reply #24 - Jul 31st, 2007 at 12:56pm
Print Post  
Quote:
Is there a function to move the whole chart to the center of the page when Direction is set to Layout.TreeLayoutDirection.LeftToRight ?


There isn't any function that will move the whole chart. You could move with the same offset the BoundingRectangle values of all boxes and the control points of all arrows.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Any VB.net sample?
Reply #25 - Jul 31st, 2007 at 12:59pm
Print Post  
Quote:
(v) Is it possible to insert controls like Button, DropDownList into Boxes?


Currently that's possible only in the Windows Forms and ActiveX versions of the control.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Any VB.net sample?
Reply #26 - Jul 31st, 2007 at 1:02pm
Print Post  
Quote:
(ii) After setting FitDocToObjects, there are lots of  blank space left on the screen, how could I maximize the backgroud of the Chart? Besides, after setting NodeDistance and LevelDistance, the vertical scrollbar exists and the chart doesn't shown completely. Are the following codes called in correct sequence?


Please email me the diagram, saved in XML format after arranging the tree and resizing the document.
  
Back to top
 
IP Logged
 
ysliew
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jul 18th, 2007
Re: Any VB.net sample?
Reply #27 - Aug 1st, 2007 at 1:47am
Print Post  
Stoyo wrote on Jul 31st, 2007 at 12:53pm:
For 3 & 4, handle the TreeExpanded and TreeCollapsed events and in the event handlers rearrange the diagram and set the document bounds.


Hi,

What code should I put in these events?

I tried to put
tl.Arrange(FlowChart1)
FlowChart1.FitDocToObjects(0.5)
but the chart did not arranged well.

Thanks.
  
Back to top
 
IP Logged
 
ysliew
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jul 18th, 2007
Re: Any VB.net sample?
Reply #28 - Aug 1st, 2007 at 1:50am
Print Post  
Stoyo wrote on Jul 31st, 2007 at 12:56pm:
There isn't any function that will move the whole chart. You could move with the same offset the BoundingRectangle values of all boxes and the control points of all arrows.


I tried the following codes to move the root, and hit the error Object reference not found.

Quote:
Dim rootNode As Node = tl.Root
rootNode.Move(600, 340)

  
Back to top
 
IP Logged
 
ysliew
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jul 18th, 2007
Re: Any VB.net sample?
Reply #29 - Aug 1st, 2007 at 1:53am
Print Post  
Stoyo wrote on Jul 31st, 2007 at 12:59pm:
Currently that's possible only in the Windows Forms and ActiveX versions of the control.

Stoyan


If I would like to put a photo and a button in the nodes, what kind of controls should I use? 3rd party controls?

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 
Send TopicPrint