Scroll bars in text box - how do you get them to work?

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 10 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
daviesg6
Posts: 49
Last visit: Tue Nov 25, 2014 1:23 pm

Scroll bars in text box - how do you get them to work?

Post by daviesg6 »

hi,

I have a need to add vertical scroll bars to a text box (read only box used to display search results). Because of the use of this box I cannot set it to a specific size and be sure it will display everything hence the scroll bars.
I have added this to the form, but it does nothing and I can't work out what is needed to get the scroll bar to make the data displayed actually scroll. Right now the indicator in the bar moves, but the data stays static.
I know it is going to be something obvious, but I think I've gone code blind.

Any suggestions?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Scroll bars in text box - how do you get them to work?

Post by jvierra »

Scrollbars on text boxes are automatic. They display when needed.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Scroll bars in text box - how do you get them to work?

Post by jvierra »

Here is a full demo of a textbox with full scrollbars:
Attachments
Demo-Text.pff
Download and run
(4.93 KiB) Downloaded 653 times
User avatar
daviesg6
Posts: 49
Last visit: Tue Nov 25, 2014 1:23 pm

Re: Scroll bars in text box - how do you get them to work?

Post by daviesg6 »

I do not see the scroll bar, if I click the bottom right corner of the results window it moves down a line, but there is no bar.

I also cannot open the demo, it says it was created in a different version of primalforms
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Scroll bars in text box - how do you get them to work?

Post by jvierra »

Here it is as a PS1 file
Attachments
Demo-Text.Export.ps1
(7.18 KiB) Downloaded 1217 times
User avatar
daviesg6
Posts: 49
Last visit: Tue Nov 25, 2014 1:23 pm

Re: Scroll bars in text box - how do you get them to work?

Post by daviesg6 »

my apologies, I had not noticed the scroll bars option in the box config. Enabling this gave me the required option.
This topic is 10 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked