wxTextCtrl questions

Hi,

- Here the sample code that shows my problems.
- Attached code: atextctrl.py

(With the hope, I did not made an enormous error)

Jean-Michel Fauth, Switzerland

begin 666 atextctrl.py
M(RTM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T-"B,@871E>'1C=')L+G!Y#0HC('=I
M;CDX<V4L('!Y(#(N,BXS+"!W>'!Y(#(N-"XP+C<@04Y$('=X<'D@,BXT+C$N
M,@T*(R Q-B!*=6QY(#(P,#,-"B,@8GD@2F5A;BU-:6-H96P@1F%U=&@L(%-W
M:71Z97)L86YD#0HC+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+0T*#0IF<F]M('=X
M4'ET:&]N+G=X(&EM<&]R=" J#0H-"B,M+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M#0H-"F-L87-S($UY4&%N96PH=WA086YE;"DZ(" @#0H-"B @("!D968@7U]I
M;FET7U\H<V5L9BP@<&%R96YT+"!I9"DZ#0H@(" @(" @('=X4&%N96PN7U]I
M;FET7U\H<V5L9BP@<&%R96YT+"!I9"P@=WA$969A=6QT4&]S:71I;VXL('=X
M1&5F875L=%-I>F4I#0H-"B @(" @(" @(R!C;V1E(#$@+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+0T*(" @
M(" @(" -"B @(" @(" @(V$@<VEN9VQE('=X5&5X=$-T<FPL(&1E9F%U;'0@
M<W1Y;&4-"B @(" @(" @<V5L9BYT8R ]('=X5&5X=$-T<FPH<V5L9BP@,3 P
M,2P@)R<L('=X4&]I;G0H."P@."DL('=X4VEZ92@T-3 L(#0P*2D-"B @(" @
M(" @<V5L9BYT8RY3971686QU92@G86)C9&5F)RD@( T*(" @(" @(" C86)C
M9&5F(&ES(&AI9VAL:6=H=&5D+W-E;&5C=&5D#0H@(" @(" @('!R:6YT('-E
M;&8N=&,N1V5T26YS97)T:6]N4&]I;G0H*0T*(" @(" @(" C<')I;G0@,"P@
M86YD('1H92!C87)E="!I<R!A="!T:&4@96YD(2 -"B @(" @(" @<V5L9BYT
M8RY3971396QE8W1I;VXH,RP@-2D-"B @(" @(" @(VYO=&AI;F<@:&%P<&5N
M<RP@8V%R970@<W1I;&P@870@=&AE(&5N9 T*(" @(" @("!S96QF+G1C+E)E
M<&QA8V4H,2P@,RP@)WIZ>B<I#0H@(" @(" @("-W;W)K<R!O:RP@=&AI<R!S
M965M<R!T;R!P<F]V92!T:&4@=&5X="!W87,@:6YD96%D('-E;&5C=&5D#0H-
M"B @(" @(" @(R!C;V1E(#(@+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+0T*(" @(" @(" -"B @(" @(" @
M(V$@<VEN9VQE('=X5&5X=$-T<FPL(&1E9F%U;'0@<W1Y;&4@<&QU<R!A(&)U
M='1O;@T*(" @(" @(" C?B!S96QF+G1C(#T@=WA497AT0W1R;"AS96QF+" Q
M,# Q+" G)RP@=WA0;VEN="@X+" X*2P@=WA3:7IE*#0U,"P@-# I*0T*(" @
M(" @(" C?B!S96QF+G1C+E-E=%9A;'5E*"=A8F-D968G*0T*(" @(" @(" C
M?B!S96QF+F)U=" ]('=X0G5T=&]N*'-E;&8L(#(P,#$L("=B=71T;VXG+"!W

%!O:6YT*#@L(#<R*2P@=WA$969A=6QT4VEZ92D-"B @(" @(" @(WX@<V5L

M9BYB=70N4V5T1F]C=7,H*0T*(" @(" @(" C;VLL(&YO('-E;&5C=&EO;@T*
M(" @(" @(" C?B!%5E1?0E545$].*'-E;&8N8G5T+" R,# Q+"!S96QF+D]N
M0VQI8VLQ*0T*(" @(" @(" -"B @(" C?B!D968@3VY#;&EC:S$H<V5L9BP@
M979E;G0I.@T*(" @(" @(" C?B!P<FEN=" G3VY#;&EC:S$G#0H@(" @(" @
M("-^('-E;&8N=&,N4V5T1F]C=7,H*0T*(" @(" @(" C?B!P<FEN="!S96QF
M+G1C+D=E=$EN<V5R=&EO;E!O:6YT*"D-"B @(" @(" @(W!R:6YT(# L(&%N
M9"!T:&4@8V%R970@:7,@870@=&AE(&5N9"$-"B @(" @(" @(WX@<V5L9BYT
M8RY3971396QE8W1I;VXH,BP@-"D-"B @(" @(" @(W=O<FMS(&]K#0H@(" @
M(" @( T*(" @(" @(" C(&-O9&4@,R M+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM#0H@(" @(" @( T*(" @
M(" @(" C82!S:6YG;&4@=WA497AT0W1R;"P@9&5F875L="!S='EL90T*(" @
M(" @(" C?B!S='D@/2!W>%1%7TU53%1)3$E.10T*(" @(" @(" C?B!S96QF
M+G1C(#T@=WA497AT0W1R;"AS96QF+" Q,# Q+" G)RP@=WA0;VEN="@X+" X
M*2P@=WA3:7IE*#0U,"P@,S0P*2P@<W1Y*0T*(" @(" @(" C?B!S96QF+G1C
M+DQO861&:6QE*"=M86EL+G1X="<I#0H@(" @(" @("-T:&4@=VAO;&4@=&5X
M="!I<R!S96QE8W1E9 T*#0H@(" @(" @(",@8V]D92 T("TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T-"@T*
M(" @(" @(" C=VET:"!R:6-H('1E>'0@8V%P86)I;&ET:65S#0H@(" @(" @
M("-^('-T>2 ]('=X5$5?355,5$E,24Y%('P@=WA415]224-(,@T*(" @(" @
M(" C?B!S96QF+G1C(#T@=WA497AT0W1R;"AS96QF+" Q,# Q+" G)RP@=WA0
M;VEN="@X+" X*2P@=WA3:7IE*#0U,"P@,S0P*2P@<W1Y*0T*(" @(" @(" C
M?B!A='1R:6(@/2!W>%1E>'1!='1R*"=2140G+" G645,3$]7)RP@=WA&;VYT
M*#$P+"!W>$U/1$523BP@=WA.3U)-04PL('=X3D]234%,*2D-"B @(" @(" @
M(WX@<V5L9BYT8RY3971$969A=6QT4W1Y;&4H871T<FEB*0T*(" @(" @(" C
M96YT97)I;F<@=&5X="!F<F]M('1H92!K97EB;V%R9"!I<R!O:PT*(" @(" @
M(" C8G5T('=I=&@@=WA415]224-(+"!T:&4@9&5F875L="!S='EL:6YG(&1O
M97,@;F]T(&%P<&QY#0H-"B @(" @(" @(R!C;V1E(#4@+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+0T*(" @
M(" @(" -"B @(" @(" @(W=I=&@@<FEC:"!T97AT(&-A<&%B:6QI=&EE<PT*
M(" @(" @(" C?B!S='D@/2!W>%1%7TU53%1)3$E.12!\('=X5$5?4DE#2#(-
M"B @(" @(" @(WX@<V5L9BYT8R ]('=X5&5X=$-T<FPH<V5L9BP@,3 P,2P@
M)R<L('=X4&]I;G0H."P@."DL('=X4VEZ92@T-3 L(#,T,"DL('-T>2D-"B @
M(" @(" @(WX@871T<FEB(#T@=WA497AT071T<B@G4D5$)RP@)UE%3$Q/5R<L
M('=X1F]N="@Q,"P@=WA-3T1%4DXL('=X3D]234%,+"!W>$Y/4DU!3"DI#0H@
M(" @(" @("-^('-E;&8N=&,N4V5T1&5F875L=%-T>6QE*&%T=')I8BD-"B @
M(" @(" @(WX@<V5L9BYT8RY7<FET951E>'0H)V%B8V1E9B<I#0H@(" @(" @
M("-A8F-D968@:7,@<V5L96-T960-"B @(" @(" @(WX@<')I;G0@<V5L9BYT
M8RY'971);G-E<G1I;VY0;VEN="@I#0H@(" @(" @("-P<FEN=" V+"!B=70@
M=&AE('=H;VQE('1E>'0@:7,@<V5L96-T960-"B @(" @(" @(WX@<V5L9BYT
M8RY3971396QE8W1I;VXH,BP@-"D-"B @(" @(" @(VYO="!O:PT*#0H@(" @
M(" @(",@8V]D92 V("TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2T-"B @(" @(" @#0H@(" @(" @("-W:71H
M(')I8V@@=&5X="!C87!A8FEL:71I97,-"B @(" @(" @(WX@<W1Y(#T@=WA4
M15]-54Q424Q)3D4@?"!W>%1%7U))0T@R#0H@(" @(" @("-^('-E;&8N=&,@
M/2!W>%1E>'1#=')L*'-E;&8L(#$P,#$L("<G+"!W>%!O:6YT*#@L(#@I+"!W

%-I>F4H-#4P+" S-# I+"!S='DI#0H@(" @(" @("-^(&%T=')I8B ]('=X

M5&5X=$%T='(H)U)%1"<L("=914Q,3U<G+"!W>$9O;G0H,3 L('=X34]$15).
M+"!W>$Y/4DU!3"P@=WA.3U)-04PI*0T*(" @(" @(" C?B!S96QF+G1C+E-E
M=$1E9F%U;'13='EL92AA='1R:6(I#0H@(" @(" @("-^('-E;&8N=&,N3&]A
M9$9I;&4H)VUA:6PN='AT)RD-"B @(" @(" @(W1H92!W:&]L92!T97AT(&ES
M('-E;&5C=&5D+"!)(&1O(&YO="!S964@82!B;&EN:VEN9R!C87)E= T*(" @
M(" @(" C9&5F875L="!S='EL92!I<R!N;W0@87!P;&EE9"$-"B @(" @(" @
M(WX@<')I;G0@<V5L9BYT8RY'971);G-E<G1I;VY0;VEN="@I#0H@(" @(" @
M("-P<FEN=" P+"!)(&1O(&YO('-E92!A;GD@8FQI;FMI;F<@8V%R970-"@T*
M#0HC+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+0T*#0IC;&%S<R!->49R86UE*'=X
M1G)A;64I.@T*#0H@(" @9&5F(%]?:6YI=%]?*'-E;&8L('!A<F5N="P@:60I
M.@T*(" @(" @("!T:71L92 ]("=A=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shows my problems.
- Attached code: atextctrl.py

[snip]

begin 600 atextctrl_py
M(RTM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T-"B,@871E>'1C=')L+G!Y#0HC('=I

[snip]

end

wow, I would have thought that even outlook express used proper mime
attachments, is that uuencode?

-Mark

···

On Wed, 2003-07-16 at 17:05, Jean-Michel Fauth wrote:

Jean-Michel Fauth wrote:

Hi,

- Here the sample code that shows my problems.
- Attached code: atextctrl.py

You seem to be getting confused by the default behaviour of the whole content of the control getting selected when it gets focus. At the point in time that you call things like GetInsertionPoint or SetSelection the control still hasn't gotten focus. It's not even visible yet and so you don't see the results of these calls. Then later when the Frame and its contents are shown and the system selects the whole content then what you see does not match what you are expecting...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!