I've a project where the content of a locktext field is programmatically populated and want to display the scrollbar only where there is more text than the one you can see. Is there a way to learn if a scrollbar is needed in a field? I can't find a way to do this... any advice?
Displaying a field scrollbar only when it's needed
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Displaying a field scrollbar only when it's needed
Hi guys,
I've a project where the content of a locktext field is programmatically populated and want to display the scrollbar only where there is more text than the one you can see. Is there a way to learn if a scrollbar is needed in a field? I can't find a way to do this... any advice?
I've a project where the content of a locktext field is programmatically populated and want to display the scrollbar only where there is more text than the one you can see. Is there a way to learn if a scrollbar is needed in a field? I can't find a way to do this... any advice?
Re: Displaying a field scrollbar only when it's needed
You can do something like:
Can do the same for hscrollbar and width of course if you have long unwrapping lines.
Code: Select all
if the formattedheight of field "fieldname" > the height of field "fieldname" then
set the vscrollbar of field "fieldname" to true
else
set the vscrollbar of field "fieldname" to false
end if
Re: Displaying a field scrollbar only when it's needed
Your code works great
Yesterday I spent a lot of time to accomplish this with no luck, so thank you so much sturgis!
Yesterday I spent a lot of time to accomplish this with no luck, so thank you so much sturgis!

