wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
6.18k stars 1.77k forks source link

wxGrid editor loses changes #20519

Closed wxtrac closed 2 years ago

wxtrac commented 21 years ago

Issue migrated from trac ticket # 1154

component: GUI-generic | priority: normal | keywords: wxGrid

2003-07-31 01:48:44: arkanes created the issue


If you are editing a cell, and click in the "blank" portion of the grid window where there are no cells, your editor will reset itself to the previous value of the grid. If the cell isn't visible on screen, then odd things happen - it looks like you drop out of editing mode, but the control stays created and visible.

The problem is that when a Mouse LeftUp event occurs thats not within a cell, ShowCellEditor is called. This is because the editor is hidden in most cases, to allow for resizing. ShowCellEditor calls editor->StartEdit, which re- initializes the editor.

I tried working around this in ShowCellEditor but couldn't find a solution that didn't break all editor initilization in general, and it wouldn't solve the second symptom anyway.

I'm not really sure how to go about not calling ShowCellEditor unless it's needed, that part of the code is pretty complicated. If I can figure it out I'll post a patch, but figured I'd post this in the meantime in case anyone else wants to look at it.

wxtrac commented 20 years ago

2004-06-09 08:17:33: preylude commented


I'd just like to add a "me too" here. I've also experienced this problem in v2.4.2 and it's pretty annoying. I too have not yet been able to find a way to fix it without breaking things worse...

wxtrac commented 16 years ago

2008-05-15 13:42:38: neis (Stefan Neis) commented


see #1118761