Selecti the Inserted Item
Posted: Thu Oct 20, 2005 2:38 pm
After I insert a label item I want this label item to be the one and only selected item (and highlighted).
Unfortunately no luck.
Any suggestions?
Thanks for your help,
Frank.
This is a part of the source:
li := TRVLabelItemInfo.CreateEx(RichViewEdit1.RVData, TEXTSTYLE_VARIABLE, '['+Variable.Description+']');
If RichViewEdit1.InsertItem('', li)
then begin
ItemNo := RichViewEdit1.CurItemNo;
RichViewEdit1.ReFormat;
RichViewEdit1.SetSelectionBounds(ItemNo, RichViewEdit1.GetOffsAfterItem(ItemNo),
ItemNo, RichViewEdit1.GetOffsAfterItem(ItemNo)+1)
end;
Unfortunately no luck.
Any suggestions?
Thanks for your help,
Frank.
This is a part of the source:
li := TRVLabelItemInfo.CreateEx(RichViewEdit1.RVData, TEXTSTYLE_VARIABLE, '['+Variable.Description+']');
If RichViewEdit1.InsertItem('', li)
then begin
ItemNo := RichViewEdit1.CurItemNo;
RichViewEdit1.ReFormat;
RichViewEdit1.SetSelectionBounds(ItemNo, RichViewEdit1.GetOffsAfterItem(ItemNo),
ItemNo, RichViewEdit1.GetOffsAfterItem(ItemNo)+1)
end;