| [ Return to Bugs & Features | Roadmap 1.3 | Post Text | Post File | Prev | Next ]
STR #3015
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Allow hiding scrollbars in Fl_Help_View |
Version: | 1.3-feature |
Created By: | sanel.z |
Assigned To: | Unassigned |
Fix Version: | 1.3-current |
Update Notification: | |
Trouble Report Files:
[ Post File ]
Trouble Report Comments:
[ Post Text ]
|
#1 | sanel.z 07:32 Dec 11, 2013 |
| Fl_Help_View will by default display scrollbars, even if widget is empty. However, addition option for explicitly hiding scrollbars (e.g. enable_scrollbars()) will be quite useful, especially when Fl_Help_View is embedded in small size widgets.
For example, in my case, I'm using it in small boxes where optional html tags can be used for text markup. | |
|
#2 | chris 10:14 Dec 11, 2013 |
| Hi,
I guess you mean, that Fl_Help_View unconditionally shows scrollbars, *when* it is necessary i.e. the content does not fit into the visible view. It certainly does *not* display scrollbars per se, when the content fits into the view completely.
What's true is, that i seems to put a very generous border around the content, so that if you display only very short content you need an unnecessary large view to contain it completely without scrollbars beeing displayed.
Whacky workaround: You can fake disabling of scrollbars, when setting scrollbar_width(-1).
Example:
------------------------------------------------------------- int main() { Fl_Window win( 130, 70, "HelpView" ); Fl_Help_View hv( 5, 5, win.w() -10, win.h() - 10 ); hv.scrollbar_size( -1 ); hv.value( "<html>" "<body border=\"0\" margin=\"0\">" "<center>" "<h1>Help View test</h1>" "<p>This is a test of the help view widget</p>" "<p>No scrollbars visible!</p>" "</center>" "</body>" "</html>" ); win.end(); win.resizable( win ); win.show(); return Fl::run(); }
-------------------------------------------------------------
Cheers, chris | |
|
#3 | sanel.z 12:14 Dec 11, 2013 |
| Thanks for the tip! Didn't know about scrollbar_width(-1) trick; this probably should be documented if not already.
However, scrollbars are shown when region is empty; probably it has to do with the case when region is small (50x50). Can you replicate this please? | |
|
#4 | chris 12:59 Dec 11, 2013 |
| Can't replicate. See attached example with 50x50 size and screenshot.
How do you use it?
chris | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |