在TWebBrowser.DesignMode='on'时,
如果用ExecCommand('Indent',...)可以使所在行内缩。那么,用什么命令(或者任何可行方式)可以使所在行变成“列表”﹖在TDHTMLEdit我是分别用ExecWB('OrderList')和ExecWB('BulletList')来使所在行变成列表的。
TWebBrowser下不知道最简单的做法是什么﹖

解决方案 »

  1.   

    这是我写的自用切换orderlist的过程:
    procedure SwitchList(wb:TWebBrowser;od:Boolean);
    var pInVar: OleVariant;
    begin
      if od then
      (wb.Document as IHTMLDocument2).execCommand('InsertOrderedList',true,pInVar) else
      (wb.Document as IHTMLDocument2).execCommand('InsertUnorderedList',true,pInVar);
    end;
      

  2.   

    > (wb.Document as IHTMLDocument2).execCommand('InsertOrderedList',true,pInVar)
    > (wb.Document as IHTMLDocument2).execCommand('InsertUnorderedList',true,pInVar); 太谢谢了。
    晚上回去试试。不过,看到这些命令前面都有 Insert ,感觉怪怪的。回去也试试(wb.Document as IHTMLDocument2).execCommand('OrderedList',true,pInVar)
    (wb.Document as IHTMLDocument2).execCommand('UnorderedList',true,pInVar); 看看这样子是不是对的。
      

  3.   

    > (wb.Document as IHTMLDocument2).execCommand('InsertOrderedList',true,pInVar) 
    > (wb.Document as IHTMLDocument2).execCommand('InsertUnorderedList',true,pInVar); 嗯,验证结果是对的,iseekcode,谢谢你。