Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

TAdvRichEditorFormatButtonBar font selection

 Post Reply Post Reply
Author
Himmer Eric View Drop Down
Member
Member
Avatar

Joined: 18 May 2014
Posts: 82
Post Options Post Options   Quote Himmer Eric Quote  Post ReplyReply Direct Link To This Post Topic: TAdvRichEditorFormatButtonBar font selection
    Posted: 02 May 2019 at 8:29pm
Is there anyway to suppress the '@' prefixed fonts from the font selection combo in a TAdvRichEditorFormatButtonBar?

Thanks,
Eric

Back to Top
Himmer Eric View Drop Down
Member
Member
Avatar

Joined: 18 May 2014
Posts: 82
Post Options Post Options   Quote Himmer Eric Quote  Post ReplyReply Direct Link To This Post Posted: 02 May 2019 at 8:52pm
I added the following code to remove them, just was hoping for a cleaner way.

    vFontCombo := TComboBox(AdvRichEditorFormatButtonBar1.Controls[16]);
    for i := vFontCombo.Items.Count-1 downto 0 do
    begin
      if vFontCombo.Items.StartsWith('@') then
        vFontCombo.Items.Delete(i);
    end;
    vFontCombo.ItemIndex := vFontCombo.Items.IndexOf('Arial');

Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7700
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2019 at 10:15am
At this moment there is not a built-in setting for this. 
This is the list as-is from querying the installed Windows fonts on the machine and Microsoft Windows returns the list with these characters.
Back to Top
Himmer Eric View Drop Down
Member
Member
Avatar

Joined: 18 May 2014
Posts: 82
Post Options Post Options   Quote Himmer Eric Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2019 at 7:07pm
As mentioned in another related post of mine, there are so many controls to pick from! ;)  Turns out I should have just picked the TAdvRichEditorFormatToolBar instead of the TAdvRichEditorFormatButtonBar.  It auto removes the '@' prefixed fonts!  It also seems more polished and complete.
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7700
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2019 at 9:53pm
TAdvRichEditorFormatToolBar is indeed more advanced as it takes advantage of other TMS Component Pack controls that are not available in the standalone TAdvRichEditor.
Back to Top
Himmer Eric View Drop Down
Member
Member
Avatar

Joined: 18 May 2014
Posts: 82
Post Options Post Options   Quote Himmer Eric Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2019 at 10:40pm
One issue, or rather enhancement request for the TAdvRichEditorFormatToolBar.  Can you make it so I can use a virtual image list for the buttons auto-populated onto the toolbar?  I had to do it for a general purpose toolbar for WPTools editor for all the actions of AdvGlowButtons on a TAdvToolbar, and it works great.  But if I go with this TAdvRichEditorFormatToolBar, the button icons are fairly small when used on a tablet set at 175% or higher scaling factor.

If it is not something that is possible in the near term (next few months), I will try to incorporate what I did for the toolbar I put together for use with WPTools.
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7700
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2019 at 11:56am
We will investigate,  it is not trivial.

To do this at application level, for example for the Bold button, following code can be used:

 (AdvRichEditorFormatToolBar1.Controls[6] as TAdvGlowButton).Picture.Graphic.Assign(nil);
 (AdvRichEditorFormatToolBar1.Controls[6] as TAdvGlowButton).DisabledPicture.Graphic.Assign(nil);
 (AdvRichEditorFormatToolBar1.Controls[6] as TAdvGlowButton).Images := ImageList1;
 (AdvRichEditorFormatToolBar1.Controls[6] as TAdvGlowButton).ImageIndex := 0;


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down