GTK2 = SetScrollInfo makes hidden scrollbar visible (differs from w32 widgetset)
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
If a scrollbar was hidden via ShowScrollBar, it can still be positioned by SetScrollInfo.
In fact is must be in order to allow the mousewheel to work (the mousewheel uses ThumbTrack, and requires the previous position to be set, so it can send the new pos)
[see http://bugs.freepascal.org/view.php?id=15765 ]
Under GTK using SetScrollInfo will un-hide the scrollbar. under Windows this is not the case.
Additional information:
See SynEdit.UpdateScrollbars line 4316
SetScrollInfo(Handle, SB_VERT, ScrollInfo, True);
{$IFnDEF SynScrollBarWorkaround}
ShowScrollBar(Handle, SB_Vert, sfVertScrollbarVisible in fStateFlags);
{$ENDIF}
compile with -dSynScrollBarWorkaround
- Create new app
- drop synedit on it
- set Scrollbars to ssNone
- add some lines of text (more lines, than fit the visible area, so it can be scrolled)
- scroll (mouse wheel)
=> scrollbars will appear
Mantis conversion info:
- Mantis ID: 16458
- Version: 0.9.29 (SVN)
- Fixed in version: 1.7 (SVN)