trichview.com

trichview.support




Re: InsertStringTag


Return to index


Author

Message

Benedikt Weber

Posted: 06/17/2002 16:51:52


Actually it seems to be a problem of repainting and reformatting. Help says:


(Reformatting and repainting are not performed because they are not needed).


However, I can fix my problem by calling RichViewEdit1->Format().

Or should I use somthing else???


My example:


//define member:

int the_number;


//insert a string with tag 1:

RichViewEdit1->InsertStringTag(the_number++,1);


//update the string, if it has tag 1:

for (int item=0; item<RichViewEdit1->ItemCount; ++item) {

        int tag= RichViewEdit1->GetItemTag(item);

        switch (tag) {

            case 1:

                RichViewEdit1->SetItemText(item,the_number++);

        }

    }

RichViewEdit1->Format();

RichViewEdit1->SetFocus();


Without Format() only the first digit is shown.


Benedikt






"Benedikt Weber" <[email protected]> wrote in message

news:[email protected]...

> I tried to do something like the livelink example. Since I am working with

> C++ I cannot run the example, but I still see what's going on. In the

> exmaple InsertStringTag is used to update the string. I observed, that

only

> a string of the original length is replaced, the rest of the new string is

> lost.  Is this observation correct? In your example, can you have "name"

> values of different length?

>

> Benedikt

>

>





Powered by ABC Amber Outlook Express Converter