How do I set the list box scroll bar width?

  1. 8 weeks ago

    Luigi F

    Sep 17 Pre-Release Testers, Xojo Pro

    I have a list box that has 2 columns and about 5 rows
    The entire list box doesn't fit on the screen (too tall)
    so it has a vertical scroll-bar. Problem is that it is
    too small for me to easily "grab" -- how do make it
    larger? (This is cross-compile for RPI) -- is there a
    property I can set?

    http://www.mediafire.com/folder/bo4fr0sboezq8/col_width

    Thanks!!

    --Lou

  2. Dave S

    Sep 17 San Diego, California USA

    you have the control being clipped by something... 1/2 your scrollbar is out of bounds

  3. Luigi F

    Sep 17 Pre-Release Testers, Xojo Pro

    just fixed that -- its still to small
    Ideas?

  4. Dave S

    Sep 17 San Diego, California USA

    it is normally 15px wide... that is the macOS standard.... and pretty much cannot be changed

  5. Luigi F

    Sep 17 Pre-Release Testers, Xojo Pro

    Fail.
    I guess “Cross platform” means “kinda cross platform”.

  6. Dave S

    Sep 17 San Diego, California USA

    what is "fail".... it seems to be the size it is supposed to be.. there is no "fail" in that.

    if you want a custom width, then create your own, but that would be against OS guidelines

  7. Luigi F

    Sep 17 Pre-Release Testers, Xojo Pro

    I’m not trying to be difficult. But what is a “fail” is that users on my raspberry pi application cant scroll the list box. They don’t care about Apple os guidelines, or anything else. They care that they cant scroll. So, how would I “create my own” ?

  8. Dave S

    Sep 17 San Diego, California USA
    Edited 8 weeks ago

    I am going to leave this conversation with one last comment.

    If there was such an issue with the Scrollbar (on PI or any other Xojo platform)... I would suspect that this forum would have dozens of other posts complaining about the same thing.... Seeing as that does not seem to be the case. I suggest your real issue lies elsewhere.

    FYI..... I said OS guidelines.... not Apple or Microsoft specificially

  9. Michel B

    Sep 17 Pre-Release Testers, Xojo Pro
    Edited 8 weeks ago

    @Luigi F I have a list box that has 2 columns and about 5 rows
    The entire list box doesn't fit on the screen (too tall)
    so it has a vertical scroll-bar. Problem is that it is
    too small for me to easily "grab" -- how do make it
    larger? (This is cross-compile for RPI) -- is there a
    property I can set?

    From your description of "grab" I infer you are using a touch screen. The Linux interface has been created with a mouse in mind.

    If the Pi screen is anything like Windows tablets, you may want to use two fingers to scroll.

    https://docs.microsoft.com/en-us/windows/win32/wintouch/windows-touch-gestures-overview

  10. Jean-Yves P

    Sep 17 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    make your own scrollbar using a canvas. you can make it any width you want. it's just more complicated to build.
    but it's a very good programming exercice.

  11. jim m

    Sep 17 Pre-Release Testers, Xojo Pro piDog.com

    Looks like Raspian OS?
    You could add your own scrollbar ... Set the width to 25 or so.
    If you want the slider to fill the trough, you may need to hack it a little with ModGTK3 .

    In the ModGTK css you could add something like

    scrollbar.vertical contents slider{min-width:20px}

    -image-

    Of course any css mod would be app-wide.
    Windows OS's also allow resizing the scrollbar.

  12. Luigi F

    Sep 17 Pre-Release Testers, Xojo Pro

    Thank you for the constructive help. I like the idea of adding my own scroll bar.
    Heck, I could even just putin an "up" and "down" button.. My next (beginner)
    question is how do I force the list box to scroll up or down from another
    control? is there a property or method to cause that to happen?

    Again, thank you. I realize that I am a beginner have questions
    that may seem obvious to many of you.

    ---Lou

  13. jim m

    Sep 17 Pre-Release Testers, Xojo Pro piDog.com

    @Luigi F is there a property or method to cause that to happen?

    You can set the scrollPosition

    Also might want to check out some videos .

  14. Jean-Yves P

    Sep 17 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    @jim m You could add your own scrollbar ... Set the width to 25 or so.

    just for the records, it doesn't work on macos at least. the width of the scrollbar stays at system 15 value.

  15. jim m

    Sep 17 Pre-Release Testers, Xojo Pro piDog.com
    Edited 8 weeks ago

    @Jean-YvesPochez it doesn't work on macos

    Yeah. Leave it to Apple...
    If you set the width, you'll want to do something like

    if targetmacos then me.width=15

    Otherwise the scrollbar hugs the right edge of the bounds of the scrollbar in the layout.

  16. Norman P

    Sep 17 Pre-Release Testers, Xojo Pro
    Edited 8 weeks ago

    Apple needs to go back to using scalable vector based graphics for controls etc
    Don't care if its PDF, TIFF, SVG or something else but hard wired control sizes make a lot of things a pain in the rear

  17. Luigi F

    Sep 17 Pre-Release Testers, Xojo Pro

    where would I put the line
    scrollbar.vertical contents slider{min-width:20px}
    ????

  18. jim m

    Sep 17 Pre-Release Testers, Xojo Pro piDog.com
    Edited 8 weeks ago

    @Luigi F where would I put the line
    scrollbar.vertical contents slider{min-width:20px}
    ????

    If you download the ModGTK3 project above, you can run the project and there'll be an editor. There you can try different values.

    To use it in your project, copy the GTK3 folder to your project. Then in App.Open, you can load the css with something like

    dim extra_css as string="scrollbar.vertical contents slider{min-width:20px}"
    modGTK3.set_GTK3_GlobalStyleCSS(extra_css+modGTK3.kGlobalGTK3CSS)

or Sign Up to reply!