TScrollBox and its Scroll bars
Hi I have a TScrollBox that well simply wont scroll when the Scroll bars
Visible property is set to false. If sbCourses->VertScrollBar->Visible is
set to true then everything works as it should. This quoted straight from
the help tells me it should.
QUOTE FROM BCB 6 HELP>> "If Visible is set to true, a scroll bar appears
whenever a visual component is less than Margin pixels from the edge of the
form or scroll box. If Visible is set to false, the scroll bar is never
visible. This is useful, for example, for programmatically controlling the
scroll position of a form without allowing the user to control the scroll
position."
However setting the scroll bar postion manually does not work (unless
sbCourses->VertScrollBar->Visible == true of course).
if (sbCourses->VertScrollBar->Position <
(sbCourses->VertScrollBar->Range - sbCourses->ClientHeight))
{
for (int i=0; i<(sbCourses->VertScrollBar->Range -
sbCourses->ClientHeight); i+=3) // This loop works.
{
sbCourses->VertScrollBar->Position = i; // This line runs but
Position does not change.
sbCourses->Update();
}
sbCourses->VertScrollBar->Position = sbCourses->VertScrollBar->Range -
sbCourses->ClientHeight;
}
I'm using BCB6 and any help would be greatly appreciated.
--
Michael Bushby
IQWorks Ltd
Ph 343 1202.
Fax 343 1118
Cell 021 888 027
Mich...@EnterpriseRetailSolutions.co.nz
2B Michelle Rd
Sockburn
Christchurch
P.O. Box 7472
Sydenham
This message and the information contained therein is intended only for the
use of the person(s) ("the intended recipients(s)") to whom it is addressed.
It may contain information that is privileged and confidential within the
meaning of applicable law. If you are not the intended recipient, please
contact the sender as soon as possible. If you are not the intended
recipient of this message you are hereby notified that you must not
disseminate, copy or take any action in relation on it.
The views expressed in this communication may not necessarily be the views
held by IQWorks Ltd.
The contents of an attachment to this e-mail may contain viruses that could
damage your own
computer system. While every reasonable precaution has been taken to
minimise this risk, IQWorks Ltd. cannot accept liability for any damage
which you sustain as a result of software viruses. You should carry out your
own virus checks before opening the attachment.