Recent

Author Topic: RichMemo scrollbars and wordwrap on OSX  (Read 9119 times)

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
RichMemo scrollbars and wordwrap on OSX
« on: April 14, 2016, 09:59:55 pm »
I noticed something odd, and I did some tests.

If I create a RichMemo, and programmatically set wordwrap and scrollbars, only the second item gets set.

Example:
RichMemo1.ScrollBars:=ssAutoBoth;
RichMemo1.WordWrap:=false;

The above will only set WordWrap while not changing scrollbars, if I do this:
RichMemo1.WordWrap:=false;
RichMemo1.ScrollBars:=ssAutoBoth;

This time I only get scrollbars and no wordwrap.

I'm guessing this is a bug, but are there any workarounds?

I'm on OSX El Capitan, Lazarus 1.6, Carbon.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #1 on: April 15, 2016, 03:05:29 am »
r4621

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #2 on: April 15, 2016, 03:37:38 am »
I uninstalled the old one, updated SVN, opened compiled and installed r4621 but looks to be having the same behavior, is there some way I can confirm that the package I'm using is the correct one?

-- Edit

I created a new application, placed a button and a TRichMemo, added a long text, and on the button click handler I do this:
RichMemo1.WordWrap:=false;
RichMemo1.ScrollBars:= ssAutoBoth;

WordWrap turns off, but scrollbars don't seem to work, they also don't work if I set scrollbar option in the object inspector.
« Last Edit: April 15, 2016, 03:39:59 am by Trenatos »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #3 on: April 15, 2016, 05:25:36 am »
what makes you think scrollbars don't work?

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #4 on: April 15, 2016, 02:03:49 pm »
When I set scrollbars programmatically, they don't show up at all, and when I do it with the object inspector, they show up when I do both on, but there's no scroll marker, at least for horizontal (Did not test vertical)

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #5 on: April 18, 2016, 03:57:35 pm »
After a little testing, here's the behavior I'm seeing;

If I do this:
currentRichMemo.WordWrap    := false;
currentRichMemo.ScrollBars     := ssAutoBoth ;

WordWrap turns off, and I get a vertical scrollbar which works as it should, but I do not get a horizontal scrollbar even though the text is definitely wider than the richmemo.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #6 on: April 18, 2016, 04:24:36 pm »
Well. it's been working like this for awhile.

I cannot find a link now, but I there was some mentioning that horizontal scrollbars won't even show in carbon rich edit. Need to do some more investigations on this.

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #7 on: April 18, 2016, 07:11:44 pm »
Is there anything I can do to help?

It's the last piece I need working before I can release a piece of software I've been working on, so if there's anything I can do to help, I'm happy to give it a go.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #8 on: April 18, 2016, 07:15:35 pm »
Is there anything I can do to help?
don't use wordwrap :D

but seriously... here's a test you could do.
Place TScrollBox on an empty form.
Add TRichMemo into it. Important: Make sure that RichMemo scrollbars are set to ssNone.
Make TRichMemo bigger than TScrollBox itself (so both horizontal and vertical scrollbars should be shown).
Add some text ... and see if Horizontal and Vertical scrollbars are showing up on the ScrollBar.



Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #9 on: April 18, 2016, 08:20:53 pm »
Yes that works.

Both scrollbars show up and work (And works with magic mouse too, which Lazarus IDE does not, I filed an error report about that a while back)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #10 on: April 18, 2016, 09:01:49 pm »

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #11 on: April 18, 2016, 10:28:13 pm »
Apple wireless buttonless mouse, uses touch sensors for swiping, scrolling, etc.

With it you can scroll horizontally as easily as vertically, but Lazarus has issues with horizontal magic mouse scroll.. BUT it seems to work with the scrollbox, which is odd..

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #12 on: April 18, 2016, 10:34:45 pm »
Apple wireless buttonless mouse, uses touch sensors for swiping, scrolling, etc.

With it you can scroll horizontally as easily as vertically, but Lazarus has issues with horizontal magic mouse scroll.. BUT it seems to work with the scrollbox, which is odd..
and what's the bug report # for it?

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #13 on: April 18, 2016, 10:53:14 pm »
The id is 0029972

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo scrollbars and wordwrap on OSX
« Reply #14 on: April 19, 2016, 02:23:22 am »
Need to do some more investigations on this.
Standard OSX scrolling view is buggy with HITextView (the richedit).
Thus it's necessary to implement own scroll view that would handle horizontal scrolling.

Potentially it should be possible, since TScrollBox works for you, which is implemented by TCarbonScrollingWinControl.

 

TinyPortal © 2005-2018