Delphi/Lazarus: Show only one Scrollbar in Scrollbox
Question by Guest | Last update on 2023-02-22 | Created on 2015-11-16
I am using a Scrollbox (TScrollBox) in one of my applications, in order to show some controls for which my form would be too small otherwise.
Up to now, the Scrollbox worked quite well, but now I have added a Label (TLabel) with WordWrap = true onto the box, which text should break automatically. Unfortunately, the text does not break to the next line and instead, the horizontal scrollbar is displayed in the Scrollbox so that you have to scroll right to see the full text now. Of course, I do not want to have this behavior, it want that the text wraps and that you can only scroll the box vertically from top to down.
In other words, I only want to show one scrollbar (in my case the vertical scrollbar). How to disable the other (horizontal) scrollbar?
Related Topics
Delphi/Lazarus: How to set up a Link to a Website in an Application
Tutorial | 0 Comments
Delphi/Lazarus: How to scroll already when moving the scrollbar
Question | 3 Answers
Delphi/Lazarus: 3 Ways to round a Number to X Decimal Places
Tutorial | 7 Comments
Delphi: Global Treatment of Errors (Exceptions)
Tutorial | 0 Comments
Delphi/Lazarus: Command Line Parameter Tutorial Part 1: Sending
Tutorial | 0 Comments
Delphi: Multiline Caption for TLabel (at Run Time and Design Time)
Tutorial | 1 Comment
Delphi/Lazarus: Delete selected Items from ListBox using DEL-Key
Tip | 3 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
The scrollbars are offering the property "Visible". If you set this property of one of the scrollbars to FALSE, only the other scrollbar will be displayed.
Here, we are setting the horizontal scrollbar to false, so that only the vertical scrollbar will be visible.
Of course, you can also adjust this setting within the Object Inspector.
Last update on 2023-02-22 | Created on 2015-11-16