Congratulation develloper-team
Vadim Zeitlin
vadim at wxwindows.org
Thu Oct 19 09:20:21 PDT 2006
On Sat, 14 Oct 2006 14:15:48 +0200 Robert Luchner <r.luchner at gmx.at> wrote:
RL> 1.) In file <src\generic\grid.cpp> as following:
RL> In <wxGridCellTextEditor>
RL> /// original code
RL> #if defined(__WXMSW__)
RL> , wxTE_PROCESS_TAB | wxTE_AUTO_SCROLL | wxNO_BORDER
RL> #endif
RL> // end original code
RL> // my code:
RL> #if defined(__WXMSW__)
RL> , wxTE_PROCESS_TAB | wxTE_PROCESS_ENTER |
RL> wxTE_AUTO_SCROLL | wxNO_BORDER
RL> #endif
RL> // end of my code
RL>
RL> The reason for this patch is: i use wxGrid very often for data input
RL> (price calcualtion etc.). And if i use the original code, the user has
RL> allways to press Return twice!
You wrote in your other post that you could see this problem in the sample
but I don't: I've just run the grid sample and entered "1" in A1 cell, then
pressed Enter and went immediately to A2 one. I also tried some other cells
and it worked as expected there too. So how exactly can I reproduce this
problem?
RL> 2.) In the file <src/msw/windows.cpp> i made the following changes in
RL> the function
RL> ...
RL> bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
RL> ...
RL> case VK_RETURN:
RL> ...
RL> #if wxUSE_BUTTON
RL> ...
RL> if ( lDlgCode & DLGC_DEFPUSHBUTTON )
RL> ...
RL> else // not a button itself, do we have default button?
RL> {
RL> /////!!!!! my patch for RETURN Handling.....
RL> if ( (lDlgCode/* & DLGC_WANTMESSAGE*/) && !bCtrlDown )
RL> {
RL> // control wants to process Enter itself, don't
RL> // call IsDialogMessage() which would consume it
RL> return false;
RL> }
RL> /////!!!!! Ende Eigencode for RETURN Handling.....
RL> wxTopLevelWindow *
RL> ...
RL> The reasen is, i alway decode <Return/Tab> by myself, and some
RL> wxControls can do this!
You need to use wxWANTS_CHARS style if you want to handle Return and Tab
keys, the patch above is not necessary.
RL> 1.) i changed the makefile.vc in internat-dir: i removed the compilaton
RL> of the ar-lanuage (in my archive it was not present)
Thanks, hopefully fixed.
RL> CONGRATUALTION AND THANK'S TO THE DEVELLOPER TEAM OF wxWidgets!
Thank you for your kind words!
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list