Check on Jump in RVMouseDown funcrion
Posted: Sat May 07, 2011 7:58 am
Hi Sergiy.
I use TRicView control (v10), which can contain Hyperlinks, tables with Hiperlinks
If HyperLink is outside of Table function work well.
When Hyperlink is in table, anfter run my function ("SelectCell(RVData);"), OnJump function doesn't run.
Because I'd like chech Jymp style in RVMouseDown funcrion, and can't do it correct...
I use TRicView control (v10), which can contain Hyperlinks, tables with Hiperlinks
If HyperLink is outside of Table function work well.
When Hyperlink is in table, anfter run my function ("SelectCell(RVData);"), OnJump function doesn't run.
Because I'd like chech Jymp style in RVMouseDown funcrion, and can't do it correct...
Code: Select all
void __fastcall Tm_MainFrm::m_DescriptionViewStrRVMouseDown(
TCustomRichView *Sender, TMouseButton Button, TShiftState Shift,
int ItemNo, int X, int Y)
{
if (GetDataPtr->GetCurrentMode() != eamTestMode && GetActiveView() != eavAnswers)
return;
//Review mode
if (GetDataPtr->GetCurrentMode() == eamReviewMode)
return;
TCustomRVFormattedData* RVData;
int a,b;
X += Sender->HScrollPos;
Y += Sender->VScrollPos * Sender->VSmallStep;
Sender->GetItemAt(X, Y, RVData, a, b, false);
======================================
[color=red] // Check Jump in table cell !!! ?????????????
???????????????????????
TRVStyle * pRVStyle;
pRVStyle = ((TCustomRVFormattedData*)RVData)->GetRVStyle();
if (((TCustomRVFormattedData*)RVData)->GetItem(pRVStyle->ItemNo)->GetBoolValueEx(rvbpJump, pRVStyle)) ???
return;
???????????????????[/color]
==========================
if (GetDataPtr->GetCurrentMode() == eamTestMode)
{
HighlightCell(RVData);
SelectCell(RVData);
}
//Learn mode
if (GetDataPtr->GetCurrentMode() == eamLearnMode)
{
AnswersListShowCorrectIncorrect(RVData);
}
}
//---------------------------------------------------------------------------
void Tm_MainFrm::SelectCell(TCustomRVFormattedData* RVData)
{
if (!RVData->InheritsFrom(__classid(TRVTableCellData)))
return;
TRVTableItemInfo* pTable = ((TRVTableCellData*)RVData)->GetTable();
int Row,
Col;
TColor Color;
int AnswerN = -1;
CBaseItem* pBaseItem = NULL;
bool bNeedUpdateAllRows = false;
//bool
pTable->GetCellPosition((TRVTableCellData*)RVData, Row, Col);
ASSERT(pTable == m_AnswerTable);
............. Work with cells etc...
m_DescriptionViewStr->Format(); // m_DescriptionViewStr -> TRichView
}