1. Jeff Hamilton
  2. PowerBuilder
  3. Wednesday, 17 January 2024 13:59 PM UTC

I am building a new logon window and need to add a length of text that wraps 3-4 lines. This would be easy in Visual Studio and supported by the textbox objects, but in PowerBuilder I do not see this option with the StaticText object. Is this expected behavior for StaticText object and is there any way to get it to wrap?

Thanks

Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 17 January 2024 14:07 PM UTC
  2. PowerBuilder
  3. # Permalink

Static text control automatically wraps if the width of control is to small. But you have to increase the height. 

Comment
There are no comments made yet.
Jeff Hamilton Accepted Answer Pending Moderation
  1. Wednesday, 17 January 2024 15:34 PM UTC
  2. PowerBuilder
  3. # 1

This does seem to work. Now if the control would scale dynamically if the main form is changed and keep the text wrapped.

Comment
  1. Kevin Ridley
  2. Wednesday, 17 January 2024 15:44 PM UTC
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 17 January 2024 14:16 PM UTC
  2. PowerBuilder
  3. # 2

Also, if you modify the text after manually resizing the control, it will change back to a single line (this might be why this class is called a "single-line" edit control), and you'll have to resize it once again.

Comment
  1. René Ullrich
  2. Wednesday, 17 January 2024 14:21 PM UTC
But singleline edit is not the same as static text ;-)
  1. Helpful 1
  1. John Fauss
  2. Wednesday, 17 January 2024 14:32 PM UTC
Whoops! You are correct, Rene. My bad. Thanks for calling me out on my faux pas.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.