Results 1 to 8 of 8

Thread: Scroll Bars - "Hide or not to Hide" is the question

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    I have a textbox that needs scrollbars "sometimes", obviously when the text "won't" fit in the box. Hmmmm - Is there a way (Of course there is stupid, you just don't know), <throat clears>:-(, <dignified posture again>, to tell the application to only show the scrollbars when the text "won't" fit in the box?????

    Sal

  2. #2
    Guest
    This probably isn't what your looking for, but I will give it a try anyway.

    did you set the text box's multiline property to true?

    then set the text box's scrollbar property

    What this will do is "grey" out the scroll bar when all the text fits in the text box, but soon as there is more text than the text box can handle, the scroll bar becomes active.

    hope this helps.

  3. #3

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    Naaa, your right, I'm looking for something else. They are greyed out, and then become active when the lines wrap past the last inch of space available. I would like to have them disappear until needed. Maybe it isn't possible.

    Thanks anyway
    Sal

  4. #4
    Lively Member
    Join Date
    Mar 2000
    Posts
    82
    If you have the windowless controls installed, the textbox.scrollbar property can be changed at runtime, that is if you can give up the .hwnd property for the textbox.

  5. #5

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    What is windowless control? ?

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    well you could hide ans show those scrollbars with iswindowvisible and showwindow api. You just need to get the hwnd of it
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262

    Question

    Could you dumb that down a little please...newbie here. Or, maybe give me an example so I can look it up in my reference library.

    Thanks,
    Sal

  8. #8
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Visible/invisible Wnd's

    Well, here's how to make visible/invisible but wait further, i will get to the scrollbars later
    Code:
    Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    
    Property Get visiblewnd(hwnd As Long) As Boolean
        clockvisible = IsWindowVisible(hwnd)
    End Property
    Property Let visiblewnd(hwnd As Long, newvalue As Boolean)
        ShowWindow hwnd, newvalue * -5
    End Property
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width