Page 1 of 1

HorzScrollBar.Visible = True when not visible.

Posted: Thu Aug 14, 2008 7:31 pm
by 9339645
I am trying to make buttons to page through graphic. While doing this I am also doing some calculating using the HorzScrollBar values. If chart has a HorzScrollBar at first and then you resize the form so it is large enough so that the HorzScrollBar disappears, the HorzScrollBar.Visible value is still true and HorzScrollBar.Position is still the last value.

Any solutions?

(I am using version 7.12)

Re: HorzScrollBar.Visible = True when not visible.

Posted: Mon Aug 18, 2008 9:18 am
by yeray
Hi Artimus,

I'm not sure to understand what exactly are you doing. Could you explain int more accurately?
Artimus wrote:you resize the form so it is large enough so that the HorzScrollBar disappears
Do you mean that the chart will overlap the ScrollBar?

Posted: Mon Aug 18, 2008 1:34 pm
by 9339645
I have a TeeTree component on a form. (at run time) I open a chart I created and the entire chart does not fit in the viewable area, so scrollbars appear. I enlarge the size of the form by dragging the bottom right corner. When the entire chart is visible, the horizontal scrollbar disappears. Now, if in the code I check the value of HorzScrollBar.Visible it is still True. HorzScrollBar.Position is also the same value as before the scrollbar disappeared. I assume the derived values for the teetree ScrollBars are not getting updated.

Posted: Tue Aug 19, 2008 9:49 am
by yeray
Hi Artimus,

I think that the ScrollBar you mention is the scroll bar that appears automatically when a form is resized smaller than a component into the form. If I'm right, note that this is a Delphi component, not a TeeChart one.
and the property to read the value is different to the property to set it:

Code: Select all

Caption := BoolToStr(HorzScrollBar.IsScrollBarVisible, True); //reading value
HorzScrollBar.Visible := False;  //setting value

Posted: Tue Aug 19, 2008 6:35 pm
by 9339645
Yep, that was it. :oops: Delphi also doesn't reset the scrollbar values if it is no longer visible.

I hope the other problem I posted is this easy.

Posted: Thu Aug 21, 2008 9:14 am
by Pep
Hello,

I've just answered, but I'm not sure what you're trying to accomplish. Please look at my other post.