http://bugs.freepascal.org/view.php?id=15765

Problem is that SynEdit at current does not update the scrollbars, if they are hidden.

But at least on windows on GTK2 the new position is alays based on the position of the old hidden scrollbar.
=> therefore the new position does not move.

On windows and GTK2 (with tricks) I can update the hidden scrollbar => and the bug disappears.


I have no ideas of the side effects this may have on other systems (QT, Mac, gtk1)

To test pleas go to SynEdit.pp   at the end of
  procedure TCustomSynEdit.UpdateScrollBars;

line 4346

    //if sfVertScrollbarVisible in fStateFlags then begin
      ScrollInfo.nPage := LinesInWindow;
      ScrollInfo.nPos := FFoldedLinesView.TextIndexToViewPos(TopLine-1);
      SetScrollInfo(Handle, SB_VERT, ScrollInfo, True);
// insert next line
ShowScrollBar(Handle, SB_Vert, sfVertScrollbarVisible in fStateFlags);
    //end;

comment out the 2 lines commented out in the above snippet (there is a similar block for horiz-scroll, but don't worry)
and insert the extra line

Then test the attached app.


the extra line is needed for gtk2 at current, but therefore it must work for others too, or gtk2 can not be fixed that way....

If you can additionally test it withou the extra line (only comment out the IF) => would be fantastic

thanks
Martin

Attachment: SynEdit_mouse_wheel.rar
Description: Binary data

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to