Commit Graph

45 Commits

Author SHA1 Message Date
Julian Smart
e015d1f7da Applied patch [ 603858 ] wxTextCtrl text alignment patch
Benjamin I. Williams

This patch implements three new flags for the
wxTextCtrl control. The flags are wxTE_LEFT,
wxTE_CENTRE, and wxTE_RIGHT. These flags can change
the way text is aligned inside an edit control, which
is useful when the user is editing numbers or dates.

At Vadim's recommendation, the patch implements the
alignment flags so they are equal to the corresponding
wxALIGN_* value. wxTE_LEFT is actually 0x0000, and is
just a place holder. wxTE_CENTRE is equal to
wx_ALIGN_CENTER_HORIZONTAL (0x0100), and wxTE_RIGHT is
equal to wxALIGN_RIGHT (0x0100). I couldn't agree more
with this idea.

As Vadim pointed out, choosing to set the text
alignment flags to the corresponding wxALIGN_* flags
has a slight negative side effect: the values 0x0100
and 0x0200 collide with the existing flags
wxTE_NO_VSCROLL and wxTE_AUTO_SCROLL. A valid point
was raised, however, which stated that the flags would
never really be used at the same time, and also that
wxTE_AUTO_SCROLL is (possibly) going to be deprecated
anyway.

While this collision is not really a problem, I didn't
like the idea of someone specifying wxTE_NO_VSCROLL and
ending up with with a centered text control ! Thus, I
chose to move both wxTE_NO_VSCROLL and wxTE_AUTO_SCROLL
down to the free bits 0x0002 and 0x0008, respectively.
I'll leave the final say up to Vadim and the rest of
you whether you want to move these flags down or keep
them where they are (with collisions). What truly
matters to me is that I can now create text controls
with the proper alignment!

This patch also updates the documentation.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-05 16:15:30 +00:00
Vadim Zeitlin
4d7b7fc212 mention that SetSelection(-1, -1) selects everything
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-30 21:29:27 +00:00
Vadim Zeitlin
674c474f20 mention that Clear() and SetValue() *will* send EVT_TEXT events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-22 18:01:38 +00:00
Vadim Zeitlin
aa8e9a36c4 added (and documented) trivial but useful IsSingleLine() and IsMultiLine() text control methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-21 18:51:04 +00:00
Vadim Zeitlin
2edb0bdef6 applied typos and spelling error fixes patch from Olly Betts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-06-07 20:15:28 +00:00
Vadim Zeitlin
d2d50a41fc wxTextCtrl::OnChar() can't be used to translate the key strokes in the text control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-24 21:31:43 +00:00
Vadim Zeitlin
94af7d45ef added wxTextCtrl::EmulateKeyPress
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-07 22:29:04 +00:00
Vadim Zeitlin
9e3229b777 added IsEditable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-12 22:42:35 +00:00
Vadim Zeitlin
74ede4ebf0 replaced non existing wxTE_HSCROLL style with wxHSCROLL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-01-23 15:58:39 +00:00
Julian Smart
aa8a815b84 Corrected wxTextCtrl doc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-01-19 17:44:24 +00:00
Vadim Zeitlin
a5aa80862c added, implemented, documented wxTE_RICH2 and wxTextCtrl::GetRange()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-01-09 01:32:02 +00:00
Vadim Zeitlin
29e1cfc224 emphasized that SetValue() doesn't make the control dirty
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-12-25 22:36:48 +00:00
Julian Smart
02a3b39120 Fixed some label errors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-12-03 11:36:04 +00:00
Vadim Zeitlin
c598f22518 SetDefaultStyle(wxTextAttr()) now resets the default style instead of not changing it at all
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-12-02 13:29:21 +00:00
Vadim Zeitlin
eda40bfc08 superposition of text styles in wxTextCtrl now works as expected (and as documented)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-11-26 14:50:50 +00:00
Robin Dunn
eef97940e8 GetSelection --> GetStringSelection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-11-14 03:50:11 +00:00
Vadim Zeitlin
184144794d added wxTextCtrl::GetSelection() returning a wxString - useful for multiline controls under Windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-11-14 01:27:16 +00:00
Vadim Zeitlin
d73e6791fc added wxStreamToTextRedirector
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-10-19 16:27:15 +00:00
Vadim Zeitlin
5a8f04e382 added and documented wxTE_NOHIDESEL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-10-18 00:53:35 +00:00
Vadim Zeitlin
5949fba636 documented SetMaxLength(0)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-08-16 13:58:56 +00:00
Vadim Zeitlin
f2616db567 added new text event macros description
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-08-16 13:35:38 +00:00
Vadim Zeitlin
ce2f50e34a added sending of EVT_TEXT_MAXLEN to wxGTK, suppressed sending of dummy
EVT_TEXT_UPDATED events when the text doesn't really change


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-08-16 13:18:51 +00:00
Vadim Zeitlin
d7eee191c5 implemented, tested and documented wxTextCtrl::SetMaxLength()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-08-15 12:45:53 +00:00
Vadim Zeitlin
c57e33394c 1. added wxTE_AUTO_URL style and support for it under Win32 (and brief
mention in docs and tests in the sample)
2. moved wxTextCtrl-specific stuff from defs.h/event.h to textctrl.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-07-29 22:40:21 +00:00
Vadim Zeitlin
5873607e5c wxPerl doc patches applied
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-12-20 16:10:46 +00:00
Bryan Petty
f6bcfd974e merged 2.2 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-15 19:51:35 +00:00
Julian Smart
b2cf617cb8 Some doc fixes; BC++, Watcom C++, Mingw32 fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-17 17:59:56 +00:00
Vadim Zeitlin
9750fc4245 1. corrected some owner-drawn buttons bugs
2. added generation of event for EVT_SPINCTRL handler to wxSpinCtrl


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-12-22 23:00:10 +00:00
Robert Roebling
9c8849722a Doc updates, wxsizer et al
wxFileDialog displays current dir now,
 wxTipProvider uses statictext for headline
 messagebox (and other) dialogs now always display
   an OK buttons, unless wxYES_NO is given
 Appending a menu to a menu bar after having called
   wxFrame::SetMenuBar() should now work
 Added test to configure so that it correctly sets
  compiler flags etc if GCC is used on Solaris and
  IRIX instead of CC, also changed default shared
  library create to GCC from G++ on some platforms
  (as previously already Linux)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-19 18:41:41 +00:00
Vadim Zeitlin
a1665b22b0 1. panels pass focus to the next item in parent panel
2. warnings removed from iniconf.cpp and it's removed for Win32 compilation
3. wxWindow::PopupMenu(wxPoint) added, documented
4. Docs for wxTextCtrl explicitly mention that EVT_TEXT is triggered by
   programmatic updates too


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-20 23:22:30 +00:00
Vadim Zeitlin
0efe5ba76e 1. wxTextCtrl compilation fixes for wxGTK and more ugfixes (untested yet)
for wxMSW. Small doc update, too.
2. wxFFile compilation fixes for wxGTK
3. new files added to gtk/Makefile.am


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 13:42:27 +00:00
Vadim Zeitlin
c50f1fb922 1. wxStaticLine implemented (generic (ugly) and MSW versions)
2. wxTextDialog looks fine under MSW again
3. startup tips added: code, sample, docs
4. read-only text controls don't participate in TAB traversal


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 21:39:49 +00:00
Robin Dunn
86975656fb wxPython documentation update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-04-30 21:11:11 +00:00
Julian Smart
e702ff0f08 Menu/toolbar event handling now tries the window with the focus first.
wxTextCtrl processes cut, copy, paste, undo, redo commands and UI updates
automatically.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-04-07 21:33:22 +00:00
Julian Smart
ca8b28f2ef Added some missing wxTextCtrl functions: Undo, Redo, CanUndo, CanRedo,
CanCopy, CanCut, CanPaste, GetSelection, IsEditable.
Also added wxNotebook::SetTabSize (only implemented on wxMSW but necessary
when using just an icon).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-04-06 16:32:33 +00:00
Julian Smart
954b8ae603 Added 'Include files' section to class references
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-02-15 20:41:29 +00:00
Julian Smart
4dba84be23 Cured some Latex problems; fixed i declaration; fixed filedlg.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-02-03 10:01:34 +00:00
Harco de Hilster
eefe541967 removed gtk_text references
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-02-03 00:34:00 +00:00
Harco de Hilster
f66205b672 Fixed incredibly stupid mistake made earlier by me that upset tex2rtf
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-02-03 00:18:45 +00:00
Harco de Hilster
abaa293664 included description of wxTextCtrl::AppendText
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-02-02 19:20:48 +00:00
Harco de Hilster
71777e2c27 Some updates to clarify definitions and behaviour of lines, columns,
positions etc. Also some general stuff added.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-01-31 04:11:10 +00:00
Robert Roebling
36b3b54ad8 Small doc corrections
Removed wxFontDirectory
  Added move event to dialog and frame
  Cannot remeber the rest


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-01-24 15:07:54 +00:00
Julian Smart
5de76427c8 OGL fixes; documentation fixes; dialog editor updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-08-06 19:42:06 +00:00
Julian Smart
eaaa6a06a2 Changed documentation const convention for non-objects; added some manual files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@92 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-06-14 12:11:50 +00:00
Karsten Ballüder
a660d684ed I've now added the documentation files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-05-20 14:25:30 +00:00