[wxPython] Embedding wxPython

For those trying to figure out how to use wxPython from within a wxWindows
app, I've just checked in some changes that allow it to be done without
strange errors or deadlocks. I've also checked in a sample of how to do it
in wxPython/samples/embedding, screenshot attached.

···

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

begin 666 embedding.png
MB5!.1PT*&@H````-24A$4@```KP```)8" (````/#:* ````*W1%6'1#<F5A
M=&EO;B!4:6UE`%=E9" Q($UA>2 R,# R(#$Y.C,P.C0R("TP.# PPC 6_ ``
M``=T24U%!](%`@(?%5+(;F0````)<$A9<P``#L,```[#`<=OJ&0````$9T%-
M00``L8\+_&$%```U;DE$051XVNW=?_0E=UT?_KN>G .A)3;!"LK/!A+S8S=L
MDM4$(613)4#P-/2D8&J-A](<W&.D! M10,PNP:"!UJ4:3^CA:SE?K(UP<DH\
M);2(L@IHZ.Y"S"]B"!C U23\:M&R\-?VO9_)3N8SO^YKYLZ]=S[W\WB<S<U\
MYLZ=><][YLX\YSUS9[;<?-/>"0! JYMN_M!QZ7_;=IR_[)(``./UOIM^,[T>
ME_UQUX';EUT>`&#4OF?9!0``-H;CBG^\^EWWSSBZ+5N.OA2Z'_WSL>XMQ]Y>
MZUOH+KR3=Q=?'NNNF<R6*>]5IM#V@?9RUI6Y4L2V,I?_:R]G<<IU']A2^[F&
M,D\O9Z%[_7);WUT92=. M3-;7\K"'^65H75FU]5+>SF+GP^4>>H:,*6<Z\O<
MN,[5E;F^)MK+V5+FPBK@&^H;ZALZLF_HNEH>I>_YS/OR[N.J;__P`[^]<ZUC
MWV2R\]IKV\>U;]^^_8?.7/8<`0!S5Q,:=DXFN]<ZTNONW;O;/Y\&V/]?OKKL
MN0" #>RYWW-??."KWO!+-[[KUSH-_YH;/M1C*MFGBHZ+?QX`F)/@+Q(.'MC?
M;_A9/I5;9FCX/_>^.[W^HS->U^E37[OS/Z37[WONOROV?.2.=Z77[S_[#5,_
M_K<'?CV]_N /_^+BY_<+?[([O3YGY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MBGY5ONR
M2RZ^\?IKXY_*VMZS.BE=`)_&DQ4F&^?4,\VOO/2EV=B^??B[U3\'J;K2...F
MSFQDQGNO0CWF?9!II=?4O:S*#*X`V;V#4I]L)%G<O.&WW_NM;_W=U$)FOVE,
MBRG+4NDUNY2A^,/=3I4?'+@T6/$>!IW&V;*4XU^?^!+O+2V:&][RQOPRD:RT
M5_V;?^5VD$1L20%PVX[S[SIPM GWX(']^Q\XM.ORER^[5*.0`O(XTW'7@HTA
MZ2^E,L<PXP`;6BDA>,IEO0>^^&"/&Q-MYH*M6)D!J!(:ZGWE;_ZF=(9O)$9;
ML!4K,P!5(WW*Y=+-<N.CL15LZ>WSRZK,I<\XP(K1T@``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-
M`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$"(T ``A @-`$!(.33LNOSE
MRRX2`#!&QQ7_>-6NURZ[/ # 2*T+#7<=N'W9Y0$`1LHU#0! B- ``(2L.SUQ
M\,#^99<'`!B+5^UZ;?'2A>-*;^]_X-"R2P@`+%_U!Y7'108"`'!-`P`0(C0`
M`"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),3:/35[A(V]@R&WRQ;01;;P+(0& I1 :`( 0H0$`"!$:`( 0
MH0$`"!G7KR?R.SMEVI]X"0`LTKA"PV3]`ZNJ[X[PD1,`L$F,Z_3$U*:%_$$)
M,_8'`+H:5VC(M3P7N^GI-5W[`P"=C#0T3*7)`0`6;'37- 2YN $`%FR,H:'E
MW,2DX3G./?H#`)V,32TT, ``,LRQFL:6IH9FA) U_X`0%=C# T`P @)#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0! B- ``(0(#0!
MB- ``(0(#0! B- ``(0(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N7V@FJK1<`P (4$T/_:QKF2C(`@*4K)8;J-0TCO4_#/)H91!,`:%)-
M#-5A!FYIR*]VG RZDVZ_B#(X42<[`*!6;6*H7M.P)>U'\Y,6!P_L'\FS)^S@
M`6 QFA)#\9J&E!#V/W!HI*<G`( %:$D,U3,4(PT-FAD`8-XZ)8;):$,#`#!7
M4Q/#E&L:4L>R9P$`6(32/1C:9=<T'-?[\P# IN+T! `0<K2EH?9B!P" HBT[
?=^Y<=AD`@ W@_P&"U!_=5'RZTP````!)14Y$KD)@@@``
`
end

Robin Dunn wrote:

For those trying to figure out how to use wxPython from within a wxWindows
app, I've just checked in some changes that allow it to be done without
strange errors or deadlocks. I've also checked in a sample of how to do it
in wxPython/samples/embedding, screenshot attached.

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

<cid:part1.01000109.03030806@hailmail.net>

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

Nice!

Patrick.

I found this suggestion from Robin in the archives (from March this year).

> How is the easiest way to synchronize two scrollbars?
> I have two wxGrid, and the horizontal scrollbars of these have to be
> synchronized.
...

You may want to try something like this instead:
    x, y = grid1.GetViewStart()
    grid2.Scroll(x, y)
    grid2.AdjustScrollbars()

I tried something like that. But the problem is: When should I run
this code? If I put it in a method triggered by EVT_SCROLLWIN the
self-object hasn't been scrolled yet, so the other window will get
out of synch. It will always be one scrolling behind the "driving"
window. Also, EVT_SCROLLWIN is only activated if I click on the
scroll bar, not if I scroll by moving around in the grid with arrow
keys etc. Should it be like that (or am I eating events somewhere
else)?

What I did now was to run something like this in EVT_IDLE:

x, y = self.GetViewStart()
if self.oldPos != (x, y):
     grid2.Scroll(x, y)
     grid2.AdjustScrollbars()

But I'm not completely happy with this arrangement. I happen to have
five grids that adjusts two or three of the other four, and I would
certainly prefer an event that reacted to real changes, rather than
to dump more and more into EVT_IDLE...

TIA

/Magnus

···

--
Magnus Lyckå, Thinkware AB
Älvans väg 99, SE-907 50 UMEÅ
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se

What I did now was to run something like this in EVT_IDLE:

x, y = self.GetViewStart()
if self.oldPos != (x, y):
     grid2.Scroll(x, y)
     grid2.AdjustScrollbars()

But I'm not completely happy with this arrangement. I happen to have
five grids that adjusts two or three of the other four, and I would
certainly prefer an event that reacted to real changes, rather than
to dump more and more into EVT_IDLE...

You could try putting it also in EVT_GRID_CELL_CHANGE or something.

···

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

Surely, that is only triggered when cell values change, not when
I just move around in the grid with the arrow keys, or when it
scrolls down because I press Enter in the lowest visible row of
the grid. And if I press enter after having changed cell content
I guess EVT_GRID_CELL_CHANGE occurs before the grid scrolls due
to Enter causing a move to the row below...

Do you have a better "or something" up your sleeve? :slight_smile: I couldn't
find EVT_GRID_CELL_CHANGE in the docs, so I haven't given up on
hidden features yet. :slight_smile:

···

At 13:08 2002-05-03 -0700, you wrote:

You could try putting it also in EVT_GRID_CELL_CHANGE or something.

--
Magnus Lyckå, Thinkware AB
Älvans väg 99, SE-907 50 UMEÅ
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se

Sorry, I pulled the wrong rabbit out of my hat. I meant to suggest
EVT_GRID_SELECT_CELL.

···

At 13:08 2002-05-03 -0700, you wrote:
>You could try putting it also in EVT_GRID_CELL_CHANGE or something.

Surely, that is only triggered when cell values change, not when
I just move around in the grid with the arrow keys, or when it
scrolls down because I press Enter in the lowest visible row of
the grid. And if I press enter after having changed cell content
I guess EVT_GRID_CELL_CHANGE occurs before the grid scrolls due
to Enter causing a move to the row below...

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

Many thanks Robin, that worked much better! :slight_smile:

But can I ask for one mowe wabbit please pwetty please? :wink:

EVT_GRID_SELECT_CELL doesn't react to clicking
or dragging in the scroll bar, and as I said,
using EVT_SCROLLWIN I get out of synch. The
"slave" windows get scrolled to the position
where the "driving" window was _before_ I clicked
in the scroll bar. :frowning: How do I get around that?

I tried EVT_LEFT_UP, but neither EVT_LEFT_UP(self ...
nor EVT_LEFT_UP(self.GetGridWindow() ... reacted to
mouse events in the scroll bar.

I also took a wild shot and called evt.Skip() and
self.Refresh() in the beginning of my method, before
self.GetViewStart() to see if that would get the
scroll bar updated before I read the values that I
enter into the other grid, but it didn't work any
better... :frowning:

···

At 14:10 2002-05-03 -0700, you wrote:

Sorry, I pulled the wrong rabbit out of my hat. I meant to suggest
EVT_GRID_SELECT_CELL.

--
Magnus Lyckå, Thinkware AB
Älvans väg 99, SE-907 50 UMEÅ
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se

Magnus Lycka wrote:

Sorry, I pulled the wrong rabbit out of my hat. I meant to suggest
EVT_GRID_SELECT_CELL.

Many thanks Robin, that worked much better! :slight_smile:

But can I ask for one mowe wabbit please pwetty please? :wink:

EVT_GRID_SELECT_CELL doesn't react to clicking
or dragging in the scroll bar, and as I said,
using EVT_SCROLLWIN I get out of synch. The
"slave" windows get scrolled to the position
where the "driving" window was _before_ I clicked
in the scroll bar. :frowning: How do I get around that?

I tried EVT_LEFT_UP, but neither EVT_LEFT_UP(self ...
nor EVT_LEFT_UP(self.GetGridWindow() ... reacted to
mouse events in the scroll bar.

I also took a wild shot and called evt.Skip() and
self.Refresh() in the beginning of my method, before
self.GetViewStart() to see if that would get the
scroll bar updated before I read the values that I
enter into the other grid, but it didn't work any
better... :frowning:

Try creating a custom event, calling wxPostEvent and evt.Skip() from the handler for EVT_SCROLLWIN, and then scrolling and adjusting the second grid in the handler for the custom event. That way, the custom event will be added to the event queue but shouldn't be processed until after the default behavior for EVT_SCROLLWIN has been completed.

For an example of how to define a custom event, see Threads.py in the wxPython/demo directory.

Note: I haven't tried this with grids, but I've used something similar to update the value of one wxTextCtrl based on the value of another after EVT_CHAR has finished processing.

David

···

At 14:10 2002-05-03 -0700, you wrote:

Robin Dunn wrote:

For those trying to figure out how to use wxPython from within a wxWindows
app, I've just checked in some changes that allow it to be done without
strange errors or deadlocks. I've also checked in a sample of how to do it
in wxPython/samples/embedding, screenshot attached.

Will this allow using wxPython from native win32 app?

regards,
Niki Spahiev