Results 1 to 2 of 2

Thread: Please can someone help!

  1. #1
    Senior Member kasavien's Avatar
    Join Date
    Aug 2005
    Location
    St. Albans
    Posts
    1,829
    Thanks
    145
    Thanked
    104 times in 49 posts

    Please can someone help!

    Hi all

    In a c# application that i'm working on at the moment i have a graph that i need to manually set the height to 800 and the width to 500.

    i'm trying to do this using the statement below. (graph is the name of the graph of type ZedGraphControl)
    Code:
    this.graph.Size. = new Size(800, 500)
    but it doesn't work, debugging it shows that the graph.Size maintains the same values that it had before i try to change the size.

    If anyone can help it will be much appreciated

    Thanks

    Andy

  2. #2
    Senior Member kasavien's Avatar
    Join Date
    Aug 2005
    Location
    St. Albans
    Posts
    1,829
    Thanks
    145
    Thanked
    104 times in 49 posts

    Re: Please can someone help!

    Ooo nevermind, i think i've sorted it, the problem seemed to be that in one instance the graph is docked so that it fills the box that it's in and resizes accordingly and I think this was preventing me manually setting the size of the graph.

    so my code looked as follows in the place where i needed to manually set the szie

    Code:
                _gt.graph.Dock = DockStyle.None;
                _gt.graph.Size = new Size(800,500);

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •