[wx-dev] Ctrl-Enter as a navigation key on wxMSW

Vadim Zeitlin vadim at wxwindows.org
Mon Mar 5 15:47:11 PST 2007


On Fri, 02 Mar 2007 12:52:50 -0800 Robin Dunn <robin at alldunn.com> wrote:

RD> I've noticed that if a multi-line text ctrl is in a window hierarchy 
RD> without any wxTAB_TRAVERSAL styled parents then Ctrl-Enter will insert 
RD> newlines, but if a parent has wxTAB_TRAVERSAL then Ctrl-Enter is used as 
RD> a navigation key and acts basically like Tab.  This becomes a problem in 
RD> situations like wxGrid where the Enter key is used for other things, as 
RD> then there is no way to insert a newline in the textctrl.  Is there a 
RD> way, or does it make sense to add one, to prevent Ctrl-Enter from being 
RD> used for navigation?  (Besides not using wxTAB_TRAVERSAL)

 Speaking of grids, Excel actually uses Alt-Enter for exactly the same
thing. Maybe we should do the same?

 Of course, we can also just not handle Ctrl-Enter as navigation key as you
can presumably already use TAB to go to the control after the text one and
other controls shouldn't need Enter. To be honest, I don't remember why did
we (I?) decide that Ctrl-Enter had to be used like this.

 Regards,
VZ





More information about the wx-dev mailing list