Guidance Forums / Rapid-Q Basic / QStringGrid  "AfterUpdate" event???

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. QStringGrid  "AfterUpdate" event???
Posted by: dbickin 2005-02-01 00:22:46
I have created a stringgrid, and am allowing theuser to edit the text in the grid. Now I need to capture the edited text after the user has FINISHED editing the cell. That is, they have hit enter or moved to ta different cell... or I guess, focus has moved to a different control. In Access I would be using the AfterUpdate event. What event would I capture in rapid-q?   I tried OnSetEditText, but that triggers on each keystroke the user makes. I need to make on write when the cell is no longer being edited. And I would prefer not to force the user to abandon the keyboard to click on a button.

Message2. Re: QStringGrid  "AfterUpdate" event???
Posted by: dbickin 2005-02-02 01:29:52
For what it is worth, I figure it out. You capture the OnSetEditText event, but then test to see if the editormode for the grid is 0. (If it is one, the cell is still being edited.)

sub grid_OnSetEditText(Col%, Row%, Value$, Grid as QStringGrid)

  if Grid.EditorMode=0 then
    ' edits are done, you can use the new value for the cell
  end if

end sub

Message3. Re: QStringGrid  "AfterUpdate" event???
Posted by: guidance 2005-02-02 11:53:37
Thanks for your contribution!
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Thu 2024-6-20  Guidance Laboratory Inc. Hits:0