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.
Syncfusion Feedback

Grid spacing

Thread ID:

Created:

Updated:

Platform:

Replies:

60943 May 15,2007 11:10 PM UTC May 16,2007 11:56 AM UTC Windows Forms 1
loading
Tags: Diagram
Julien GRAINGEOT
Asked On May 15, 2007 11:10 PM UTC

The View.Grid.VerticalSpacing and View.Grid.HorizontalSpacing properties was "float" in the V4, "int" in the V5. It's a problem for my application because I need a precise number of grid cells in a sizable surface.

Thanks.

Meera Fathima [Syncfusion]
Replied On May 16, 2007 11:56 AM UTC



Hi Graingeot,

Yes, as with the new version of Diagram, the LayoutGrid.HorizontalSpacing/VerticalSpacing properties are of int type. We will analyze about making these properties to float type and do the changes accordingly. Please create a DT incident with the subject of this forum .

Also you can achieve this requirement by customizing the LayoutGrid,View and Diagram classes and overriding the desired methods and properties.

I have created a sample that uses the HorizontalSpacing and VerticalSpacing properties of float type. You can download the sample from the following link - http://websamples.syncfusion.com/samples/Diagram.Windows/F60943/Main.htm

Sample Details :

1. MyLayoutGrid is the custom class created from the LayoutGrid. It provides the new HorizontalSpacing and VerticalSpacing properties of float type and overrides DrawLineGrid(),DrawVerticalLines() and DrawHorizontalLines() methods that use the new horizontal and vertical spacing properties.

2. MyView is the custom class created from the View class. It provides a LayoutGrid property of MyLayoutGrid type. And it overrides the Draw() method that calls the MyLayoutGrid.Draw() method .

3. MyDiagram is the custom class created from the diagram class. It overrides the CreateView(0 method that is used to create the view of MyView type.

4. The sample uses MyDiagram class instead of the default diagram.

In this sample, the view uses line type gridstyle. And hence DrawLineGrid(),DrawVerticalLines() and DrawHorizontalLines() methods in the MyLayoutGrid class have been customized and the new HorizontalSpacing and VerticalSpacing properties of float type are used in this methods.

If you want to use the point type grid style, please override the DrawPointGrid() and DrawPoints() methods and use the new HorizontalSpacing and VerticalSpacing properties of float type in this method.

I hope the above informations will help you. Please let me know if you have any more questions regarding this.

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.

Warning Icon 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.Close Icon

;