Announcement

Collapse
No announcement yet.

textbox scrollbars hidden until needed?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • textbox scrollbars hidden until needed?

    Sad to relate that I have no idea how to draw a textbox whose scrollbars appear only when needed. So that for example, the horizontal scrollbar appears if the text added is too long for the width of the textbox.

  • #2
    I guess I've just gotten used to it being disabled and visible and enables itself if needed...
    Adam Drake
    PowerBASIC

    Comment


    • #3
      Originally posted by Adam J. Drake View Post
      visible
      That's the problem. Hideous on a colored background.

      Comment


      • #4
        funny, you can do it with Listboxen but when the scrollbar is hidden the space which it would have occupied is filled with white or something very like it, just as ugly.

        Will have to go to plan B, using a label and wrapping the long string inside it - I know that labels have a wordwrap property but this string is a path which may or may not have spaces.

        Comment


        • #5
          Use a rich edit textbox instead. It auto hides scrollbars when they're not needed.

          Comment


          • #6
            I agree with Bud, and I only discovered this happenstance yesterday while updating some old code to concepts I now understand.

            Makes for a cleaner looking form (but most of us overlook the scrollbars because they have always been there) so when I tried RichEdit, I lost an hour trying to figure out why scrollbars were not showing until I either spaced off screen, or $CR down off screen and it hit me no more greyed out scrollbars....I like it.

            Engineer's Motto: If it aint broke take it apart and fix it

            "If at 1st you don't succeed... call it version 1.0"

            "Half of Programming is coding"....."The other 90% is DEBUGGING"

            "Document my code????" .... "WHYYY??? do you think they call it CODE? "

            Comment


            • #7
              Originally posted by Chris Holbrook View Post
              funny, you can do it with Listboxen but...
              Is that using style %WS_HSCROLL and %LB_SETHORIZONTALEXTENT ? I've used that before without problems (maybe default background though).

              .. but this string is a path which may or may not have spaces.
              For Windows NT and later, maybe a %SS_PATHELLIPSIS styled label would do?
              Rgds, Dave

              Comment


              • #8
                Originally posted by Dave Biggs View Post
                For Windows NT and later, maybe a %SS_PATHELLIPSIS styled label would do?
                Yes it would and thank you very much Dave!

                Comment

                Working...
                X