We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Symbol constrants

Thread ID:

Created:

Updated:

Platform:

Replies:

36031 Oct 18,2005 10:53 PM Oct 25,2005 10:55 AM Windows Forms 4
loading
Tags: Diagram
Tim Wendland
Asked On October 18, 2005 10:53 PM

Is there a way to limit the vertail reszing of a symbol. For example, I''m adding a predefined symbol to a diagram, and I only want the user to be able to adjust the symbols length. what is a good way to achive this?

Meera Fathima [Syncfusion]
Replied On October 19, 2005 09:57 AM

Hi Tim, You can do this by overriding the Symbol''s OnBoundsChanged() method and within that you can restrict the symbol''s height/width from being modified. Please let me know if you have any queries on this. Thanks, Meera.

Tim Wendland
Replied On October 19, 2005 12:47 PM

thank you Meera, in my symbol class i add the following: Protected Overrides Sub OnBoundsChanged(ByVal e As Syncfusion.Windows.Forms.Diagram.BoundsEventArgs) Me.Height = e.OldBounds.Height Me.X = e.OldBounds.X Me.Y = e.OldBounds.Y End Sub and now the user can not change the height of the symbol... >Hi Tim, > >You can do this by overriding the Symbol''s OnBoundsChanged() method and within that you can restrict the symbol''s height/width from being modified. > >Please let me know if you have any queries on this. > >Thanks, >Meera.

Meera Fathima [Syncfusion]
Replied On October 24, 2005 08:25 AM

Hi Tim, My apologies for the delay in getting back to you on this issue. I misunderstood that you got resolved on this. Me.Height refers to the currently selected node''s height hence setting the old bounds value to the currently selected node causes the symbol''s height remains unchanged. If your intension is to prevent the symbol''s height from being changed beyond some value then kindly look at the following sample code snippet. if(this.Height>150.0F) { Me.Height = evtArgs.OldBounds.Height; Me.X = evtArgs.OldBounds.X; Me.Y = evtArgs.OldBounds.Y; } Please let me know if you have any further questions on this issue. We will be glad to assist. Thanks, Meera.

Tim Wendland
Replied On October 25, 2005 10:55 AM

thank you Meera, my issue is resolved, great job! >Hi Tim, > >My apologies for the delay in getting back to you on this issue. I misunderstood that you got resolved on this. Me.Height refers to the currently selected node''s height hence setting the old bounds value to the currently selected node causes the symbol''s height remains unchanged. If your intension is to prevent the symbol''s height from being changed beyond some value then kindly look at the following sample code snippet. > >if(this.Height>150.0F) > { > Me.Height = evtArgs.OldBounds.Height; > Me.X = evtArgs.OldBounds.X; > Me.Y = evtArgs.OldBounds.Y; > } > >Please let me know if you have any further questions on this issue. We will be glad to assist. > > >Thanks, >Meera.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;