]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | # -*- coding: iso-8859-1 -*- |
2 | #---------------------------------------------------------------------- | |
3 | # Name: wxPython.lib.rightalign | |
4 | # Purpose: A class derived from wxTextCtrl that aligns the text | |
5 | # on the right side of the control, (except when editing.) | |
6 | # | |
7 | # Author: Josu Oyanguren | |
8 | # | |
9 | # Created: 19-October-2001 | |
10 | # RCS-ID: $Id$ | |
11 | # Copyright: (c) 2001 by Total Control Software | |
12 | # Licence: wxWindows license | |
13 | #---------------------------------------------------------------------- | |
1fded56b | 14 | |
d14a1e28 RD |
15 | """ |
16 | Some time ago, I asked about how to right-align | |
17 | wxTextCtrls. Answer was that it is not supported. I forgot it. | |
18 | ||
19 | Just a week ago, one of my clients asked me to have numbers right | |
20 | aligned. (Indeed it was that numbers MUST be right aligned). | |
21 | ||
22 | So the game begun. Hacking, hacking, ... | |
23 | ||
24 | At last, i succeed. Here is some code that someone may find | |
25 | useful. ubRightTextCtrl is right-aligned when you are not editing, but | |
26 | left-aligned if it has focus. | |
27 | ||
28 | Hope this can help someone, as much as this list helps me. | |
29 | ||
30 | Josu Oyanguren | |
31 |