10-26-2005 04:44 PM
10-26-2005 05:07 PM
There are no properties/methods available to give you this information at any arbirtrary time. However, depending on what you're trying to do, you may find the BeforeDrawCaption and AfterDrawCaption events useful. You can use these events to implement custom drawing within the bounds of the caption. The arguments of these events have a Bounds property, which provides the coordinates and dimensions of the caption in pixels.
Just out of curiosity, what are you trying to do and how would this information help with doing it?
- Elton
10-26-2005 05:16 PM - edited 10-26-2005 05:16 PM
Message Edited by Sof on 10-26-2005 05:17 PM
Message Edited by Sof on 10-26-2005 05:18 PM
10-26-2005 05:56 PM
Are you using the caption to reserve space within the bounds of the graph so that you can fit the scrollbar within the bounds of the graph? If so, here's another approach:
Does this achieve the same end result as what you were doing before? If not, what is different?
- Elton
10-26-2005 06:42 PM
Well, no. The caption actually serves a fundamental use. It displays the "Sensor name" that is being graphed from real-time continuous data. When the user presses a toolbar button to look at history, I place the scrollbar over the caption. The only reason I placed it there was it was clean and convienient.
I like your idea, however, if I fully understand you, I don't think it will work for my app. I have to place the scroll bar on the left side somewhere. I could do as you suggest with another yaxis but it's location would not be immediately obvious because of the already existing YAxis located next to the PlotArea.
Maybe your first suggestion will work when the caption is drawn.
ScottyO
10-26-2005 07:04 PM
{
if( _FileView ) this.HistorySlider.Bounds = e.Bounds;}
Very nice, very simple. Thanks Elton for the assistance.
ScottyO
05-12-2006 09:46 AM
This only seems to work when the dock property of the graph is set to fill. Hum??
I have multiple graphs on the same form, so I would like to use a different layout.