WPBulletDlg1

  • WPBulletDlg1.Execute will display a three tab dialog with the caption of the tabs from 0 to 2 = bullets, numbers, outlines. The second tab will be the active tab.


    What is the mechanism to have the first tab (tab 0) being the active tab when the dialog first displays?


    I can find no reference to this in the help file. Delphi 10.1 and wPTools 7


    TIA


    John

  • My question remains, how to set the current number style? Neither the help file nor code completion functionality illustrates the code to display the first tab when the WPBulletDlg is initially displayed.


    WPRichText1.NumberStyles.SelectedStyle := ???


    Any help would be appreciated.

  • WPRichText.Num berStyles is the collection which contains the default and any added numbering styles.


    To select a style use CurrAttr.NumberStyle and assign the id of the required style.


    This code will create a numbering style with special before and after texts.


    Example using 'CurrAttr': Assign simple 1,2,3 numbering to the selected text:


    var ind : Integer;
    begin
    ind := 360;
    WPRichText1.SelectAll;
    WPRichText1.CurrAttr.BeginUpdate;
    WPRichText1.CurrAttr.IndentLeft := ind;
    WPRichText1.CurrAttr.IndentFirst:= -ind;
    WPRichText1.CurrAttr.SetNumberStyle(
    Before1.Text, After1.Text, '', wp_1, ind );
    WPRichText1.CurrAttr.EndUpdate;
    WPRichText1.HideSelection;
    end;