Beiträge von +m+

    Goodmorning, is it possible to hide (or show) the text into a bookmark?

    This works

    Code
    if WP.BookmarkSelect('pippo',false) then wp.TextCursor.CurrAttribute.ToggleCharstyle(WPSTY_HIDDEN);


    ...
    but this don't

    Code
    if WP.BookmarkSelect('pippo',false) then
       begin
           if SHOW then
               wp.TextCursor.CurrAttribute.SetCharstyles(WPSTY_HIDDEN,0)
           else
               wp.TextCursor.CurrAttribute.SetCharstyles(WPSTY_HIDDEN,1);
       end;

    I don't want to toggle the hidden attribute of selected text (bookmark), I want to set.
    Best regards, Mario

    After design a particular style (Word, RTF), look the TABs


    I try
    WP.activestylename:='newstyle';
    but in WPRichEdit the tabs was not restored


    Is this normal? Any workaround?
    EDIT:
    I have to manually insert something like

    Code
    WP.ActiveParagraph.TabstopAdd(WPCentimeterToTwips(10.25), tkRight, tkNoFill);
       WP.ActiveParagraph.TabstopAdd(WPCentimeterToTwips(10.75), tkLeft, tkNoFill);
       WP.ActiveParagraph.TabstopAdd(WPCentimeterToTwips(13), tkRight, tkNoFill);

    Thanx

    Massimo
    PS sorry but IMG doesn't seems to work

    Cannot find anything in manual, nor PDF, nor CHM, but I use a simple

    Code
    wp.cpposition:=wp.cpposition+1;


    (very dirty, but effective)
    to simulate "right-arrow", plus "spreadsheet-mode" flag and

    Code
    WP.InsertRow

    to add another row, and a couple of

    Code
    Wp.inputstring(chr(127));

    to erase (eventually) empty space after the token.

    AFAIK there is not a function that, given the cursor "somewhere" (into a table), return the table name and/or the Tparagraph where the cursor itself is, so I cannot use par:=par.nextpar and so on.

    In this case the template RTF was written by Microsoft Word, thus without the "wpcubed table name"

    Thanx anyway for help

    I need some help to move cursor between pre-designed table.

    First I find the start of the table

    WP.Finder.ToStart;
    While WP.Finder.Next('#starttoken#') do
    WP.SetSelPosLen(WP.Finder.FoundPosition, WP.Finder.FoundLength);

    now write something...

    wp.inputstring('Hello');

    then I want to go to next cell (like sending CHR(9) in Word), but inputstring does not handle TAB char, neither I find an easy way.

    Help please!