Recent

Author Topic: RichMemo - more detailed doc?  (Read 27788 times)

kuzja

  • New Member
  • *
  • Posts: 20
Re: RichMemo - more detailed doc?
« Reply #30 on: March 13, 2015, 09:42:41 pm »
Ehm... it would be really nice to close that can... :)
Installed r4019 and retested SetTextAttributes(...TFont). If Style set to fsItalic, fsUnderline or fsStrikeOut, it works. If set to fsBold, does not work...  :(
This is odd. I tested on the full style set.  I'll double check.
I repeated the test, with the same result.
This works:
Code: [Select]
var p: TFontParams;
...
  RichMemo1.GetTextAttributes(RichMemo1.SelStart, p);
  p.Color:=clBlue;
  p.Style:=[fsBold];
  RichMemo1.SetTextAttributes(RichMemo1.SelStart, RichMemo1.SelLength, p);
This does not work (i.e. it sets the color to blue, but the style is default, not bold):
Code: [Select]
var f: TFont;
...
  f:=TFont.Create;
...
  f.Assign(RichMemo1.Font);
  f.Color:=clBlue;
  f.Style:=[fsBold];
  with RichMemo1 do
     SetTextAttributes(SelStart,SelLength,f);
...
  f.Free;
Odd it is, that's true...

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo - more detailed doc?
« Reply #31 on: March 13, 2015, 10:02:19 pm »
what happens if you use
Code: [Select]
f.Style:=[fsBold,fsItalic];
?
« Last Edit: March 13, 2015, 10:09:01 pm by skalogryz »

kuzja

  • New Member
  • *
  • Posts: 20
Re: RichMemo - more detailed doc?
« Reply #32 on: March 13, 2015, 10:31:56 pm »
what happens if you use
Code: [Select]
f.Style:=[fsBold,fsItalic];
?
Text style is italic, but not bold.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo - more detailed doc?
« Reply #33 on: March 14, 2015, 01:31:16 am »
Was testing with not very slim font! r4025 should have the issue with the bond font fixed!

Btw, after the update, please do the following Project -> View Project Source
In the uses section you should find "richmemopackage". Please remove it from the uses section.
It has nothing todo with the font issues, but it will save you up to 400Kb in the stripped executable (gtk2). As well as might save some milliseconds on compilation.

kuzja

  • New Member
  • *
  • Posts: 20
Re: RichMemo - more detailed doc?
« Reply #34 on: March 15, 2015, 11:00:14 pm »
Was testing with not very slim font! r4025 should have the issue with the bond font fixed!
I've made only a simple test, but it seems to be okay now. :)
Thanks for your effort! :)

Quote
Btw, after the update, please do the following Project -> View Project Source
In the uses section you should find "richmemopackage". Please remove it from the uses section.
It has nothing todo with the font issues, but it will save you up to 400Kb in the stripped executable (gtk2). As well as might save some milliseconds on compilation.
Thanks for the tip :)

kuzja

  • New Member
  • *
  • Posts: 20
Re: RichMemo - more detailed doc?
« Reply #35 on: March 15, 2015, 11:03:22 pm »
Another thing I would like to ask about are the TAB stops in RichMemo... But I suppose it would be more correct to start a new topic for that, wouldn't it? :)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo - more detailed doc?
« Reply #36 on: March 16, 2015, 05:01:01 am »
Another thing I would like to ask about are the TAB stops in RichMemo... But I suppose it would be more correct to start a new topic for that, wouldn't it? :)
sure, tabs can be added. It was on my todo list anyway. And feel free to start a new topic.

kuzja

  • New Member
  • *
  • Posts: 20
Re: RichMemo - more detailed doc?
« Reply #37 on: March 16, 2015, 04:56:26 pm »
Before I start the new topic, I have one more question, please.
With WordWrap=true, I set RichMemo ScrollBars property to ssNone (both in design and run time), but the vertical scrollbar is still shown when the number of lines exceeds the size of RichMemo window (as if set to Auto).
Can I make the scrollbar disappear somehow?
Thanks again. :)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo - more detailed doc?
« Reply #38 on: March 16, 2015, 05:05:52 pm »
another visual bug. Let me see if I can fix it.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo - more detailed doc?
« Reply #39 on: March 16, 2015, 06:53:48 pm »
r4040 starts tab stops. But currently win32 is the only widgetset that implements them.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo - more detailed doc?
« Reply #40 on: March 17, 2015, 04:56:37 am »
r4044 tab stops for gtk2. Issues with srollbars should be fixed.

kuzja

  • New Member
  • *
  • Posts: 20
Re: RichMemo - more detailed doc?
« Reply #41 on: March 17, 2015, 07:13:18 pm »
r4044 tab stops for gtk2. Issues with srollbars should be fixed.
Scrollbars seem to be ok now. But during the test I noticed that word wrap is active even if WordWrap property is set to false. Could there be something I overlooked...?
Now I am going to experiment with the tab stops... man, I am curious :)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo - more detailed doc?
« Reply #42 on: March 17, 2015, 07:46:38 pm »
ugh. That's because WordWrap is hard-coded to be enabled.

Will fix that... why did I do that in the first place?! This is hard to notice, until scrollbars are working as defined by properties :)

kuzja

  • New Member
  • *
  • Posts: 20
Re: RichMemo - more detailed doc?
« Reply #43 on: March 17, 2015, 08:41:20 pm »
Just want to report my first experience with the tab stops is positive. :)

I have also noticed that there is some kind of "automatic tabbing" in case there are more actual TAB characters in the text line than is the number of the defined tab stops. This is fine, but I suggest it should be documented, as it affects the layout of the text also in case a part of it is too big to fit in the predefined tab stops. If one is not aware of this behaviour, the output might seem to be buggy at the first glance...

But anyway, there is nothing wrong about it, I suppose. Thumbs up for good work. :)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: RichMemo - more detailed doc?
« Reply #44 on: March 17, 2015, 10:08:34 pm »
I have also noticed that there is some kind of "automatic tabbing" in case there are more actual TAB characters in the text line than is the number of the defined tab stops. This is fine, but I suggest it should be documented, as it affects the layout of the text also in case a part of it is too big to fit in the predefined tab stops. If one is not aware of this behaviour, the output might seem to be buggy at the first glance...
Yeah... there're tricks about that.
But you're right, if there're more tabs characters than defined by SetTabs the "automatic" tabs are used (Win32 and Gtk2).
Currently they behave differently on each widgetset, so this is a subject to change!
I.e. Win32 would use it's own "default" tab length (which is similar to Open Office Writer or MS Word)
Gtk2 would use the last tab length
Cocoa would just start a new line.
So beware!

I'll document the behavior as soon as it's works on all platforms the same (very likely to reflect what Win32 does).
« Last Edit: March 17, 2015, 10:10:25 pm by skalogryz »

 

TinyPortal © 2005-2018