trichview.support
Re: current cell |
Author |
Message |
Miro |
Posted: 07/21/2002 0:05:12 thanks miro "Sergey Tkachenko" <[email protected]> wrote in message news:[email protected]... > Hi, > > This is by design. If cursor is before or after the table, this table is > treated as active. > > If you do not like it, try to make further processing of results of > GetCurrentItemEx. > > uses RVRVData; > > if table.GetEditedCell(rowe,colE)=nil then > if table.Rows.FMainRVData.GetSourceRVData is TRVTableCellData then begin > // this table is nested > table := > TRVTableCellData(table.Rows.FMainRVData.GetSourceRVData).GetTable; > rve := (table.Rows.FMainRVData as TRichViewRVData).RichView as > TCustomRichViewEdit; > end; > > Unfortunately, table.Rows.FMainRVData is protected, you need to move it to > public section. > > if table.GetEditedCell(rowe,colE)=nil then > if > > table.cells[rowe,cole]; > > > i'm using following code: > > > > if dbrichview.GetCurrentItemEx(TRVTableItemInfo, rve, item) then > > begin > > table := TRVTableItemInfo(item); > > if table.GetEditedCell(rowe,colE) <> nil then cell := > > table.cells[rowe,cole]; > > end; > > > > in most cases this works fine, but if i set my cursor for example on > > positions with '*' inside table1 (see attachment) i don't get any cell > back > > because GetCurrentItemEx returns table2 ---> and there is no edited cell > in > > table2 (only in table1) > > > > i think reason for this is that GetCurrentItemEx recursively looks for > > tables in tables if inplaceeditor is not nil: > > > > > > function TCustomRichViewEdit.GetCurrentItemEx(RequiredClass: > > TCustomRVItemInfoClass; > > var ItemRichViewEdit: TCustomRichViewEdit; > > var Item: TCustomRVItemInfo): Boolean; > > var Item2: TCustomRVItemInfo; > > ItemRichViewEdit2: TCustomRichViewEdit; > > begin > > if GetItem(CurItemNo) is RequiredClass then begin > > Item := GetItem(CurItemNo); > > ItemRichViewEdit := Self; > > end > > else begin > > Item := nil; > > ItemRichViewEdit := nil; > > end; > > if (InplaceEditor<>nil) and (InplaceEditor is TCustomRichViewEdit) and > > TCustomRichViewEdit(InplaceEditor).GetCurrentItemEx(RequiredClass, > > ItemRichViewEdit2, Item2) then begin > > Item := Item2; > > ItemRichViewEdit := ItemRichViewEdit2; > > end; > > Result := Item<>nil; > > end; > > > > > > > > > > did anyone have any fixes or solution for this problem? > > > > thanks > > miro > > > > > > > > |
Powered by ABC Amber Outlook Express Converter