Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
EditorButton simulate button click
posted

Hi,

I have an EditorButton that is an editor for a column in the grid. When user clicks on its right button I perform an action that requires current cell coordinates. This works as needed.
Here is the code.

void IGBdfDetailsPopupEdit::ButtonEditClick(System::Object ^sender, Infragistics::Win::UltraWinEditors::EditorButtonEventArgs ^e)
{
UltraTextEditor ^btn = (UltraTextEditor^)sender;
UltraGridCell ^cell = (UltraGridCell^)e->Context;
CellUIElement ^element = (CellUIElement^)cell->GetUIElement();
currentRectangle = grid->NativeGrid()->RectangleToScreen(element->Rect);
grid->CallPopup(this); // private method
}

Now I need to have the same behavior when user presses F4 in the text editor. I cannot extract this method and reuse as I don't have a reference to the Context in that new method.

How would I simulate a click on the EditorButton/RightButton element. It doesn't have the PerformClick as the normal button has.

Thx

 

Parents Reply Children