HorzScrollBar.Visible = True when not visible.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Artimus
Newbie
Newbie
Posts: 18
Joined: Fri Oct 22, 2004 4:00 am

HorzScrollBar.Visible = True when not visible.

Post by Artimus » Thu Aug 14, 2008 7:31 pm

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)

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: HorzScrollBar.Visible = True when not visible.

Post by Yeray » Mon Aug 18, 2008 9:18 am

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?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Artimus
Newbie
Newbie
Posts: 18
Joined: Fri Oct 22, 2004 4:00 am

Post by Artimus » Mon Aug 18, 2008 1:34 pm

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.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue Aug 19, 2008 9:49 am

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Artimus
Newbie
Newbie
Posts: 18
Joined: Fri Oct 22, 2004 4:00 am

Post by Artimus » Tue Aug 19, 2008 6:35 pm

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.

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 21, 2008 9:14 am

Hello,

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

Post Reply