WPCubed Product Support

emulating numbered list button click from WPToolBar

I'm trying to create a shortcut key that will allow users to create a numbered list in the exact fashion as clicking the numbered list button in the WPToolbar.

Ideally I'd like to just call the WPToolbar button directly, or by using the group number etc, but can't see any way to do that.

This does toggle the list like the button, but does not indent the same way. Is there a better way to do this?

if WPRichText1.CurrAttr.NumberStyle = 3 then begin
    WPRichText1.CurrAttr.NumberStyle := 0;
    WPRichText1.SetFocus;
  end else begin
    WPRichText1.CurrAttr.NumberStyle := 3;
    WPRichText1.SetFocus;
  end;
#1 ♥ 0
3.4k Views 2 users read 1 min

Hi,

the easiest would be to use the numbering standard wptools action and attach a shortcut key to it.

See manual: Use Actions

Julian

#2 ♥ 0
This category is archived. No new posts are possible.