No. What is usually done instead is to use a timer, and (re)start it in each EVT_SIZE event. When the user stops resizing (or pauses for long enough) then the timer will expire and you can do your other sizing operation.
···
On 1/21/10 1:50 PM, Stef Mientki wrote:
hello,
I'm trying to dock other applications in wxPython MDI-childs.
The foreign applications fills the whole MDI-child.
(With this trick, I hope to reuse a number of Delphi applications in Python)
Now I can get an OnSize event from the MDI child,
but as I don't wont to resize the foreign application each pixel,
I added a timelag, but that doesn't seem to be enough.
Puttting the foreign application in a splitter,
moving of the sash works perfect,
because the sash only gives an onsize event after the sash is dropped.
So is there a OnAfterReSize event, or a similar method that would work ?
this goes well as long as the user moves the rezising window.
If the user stays too long at a certain point (while dragging),
the size event happens.
But as I’ve a foreign application (Delphi-application or Notepad)
docked in my window,
the following happens:
The dock window is resized
The docked application is resized
now probably the focus is lost (focus demanded by the foreign
application ?)
both my own window and the docked foreign application resizes back to
their orginal size
If I set the time long enough it’s usable.
Isn’t there a way to detect the current status of the mouse buttons ?
thanks,
Stef
···
On 23-01-2010 01:47, Robin Dunn wrote:
On
1/21/10 1:50 PM, Stef Mientki wrote:
hello,
I’m trying to dock other applications in wxPython MDI-childs.
The foreign applications fills the whole MDI-child.
(With this trick, I hope to reuse a number of Delphi applications in
Python)
Now I can get an OnSize event from the MDI child,
but as I don’t wont to resize the foreign application each pixel,
I added a timelag, but that doesn’t seem to be enough.
Puttting the foreign application in a splitter,
moving of the sash works perfect,
because the sash only gives an onsize event after the sash is dropped.
So is there a OnAfterReSize event, or a similar method that would work
?
No. What is usually done instead is to use a timer, and (re)start it
in each EVT_SIZE event. When the user stops resizing (or pauses for
long enough) then the timer will expire and you can do your other
sizing operation.
I would be interested to know how you dock a foreign app. in a
wxpython MDI frame...
Can you share some info/code on this?
Thanks,
Tom.
···
On Jan 25, 11:25 pm, Stef Mientki <stef.mien...@gmail.com> wrote:
On 25-01-2010 23:06, Robin Dunn wrote:
> On 1/25/10 1:50 PM, Stef Mientki wrote:
>> On 25-01-2010 19:40, Robin Dunn wrote:
>>> On 1/25/10 5:06 AM, Stef Mientki wrote:
>>>> Isn't there a way to detect the current status of the mouse buttons ?
>>> See wx.GetMouseState
>> thanks very much Robin,
>> that works great for simulating a "end of resize"-event.
> Do you check it from the timer handler or have you dropped the timer
> and just check it in the EVT_SIZE handler? (Just curious.)
Yes in the timer handler,
in the OnSize handler, LeftMouse seems to be always down.
I just heard from my son,
he has a one line AutoIt code, to dock any application as a MDI child,
as soon as he has found it, I'll see if it can simplify things.
I let you know if there are positive results.
Sure Tom,
as soon as I've cleaned up the code, I'll post it here.
For my final goal I've to solve some problems:
- focusing of the docked application unfocuses the dock container (with some weird side effects)
- sending messages between dockcontainer and docked application (might solve also the previous item)
it probably lacks the same size problem we discussed just now (but I don't need resize in that program).
And here's the one liner from Autoit,
$Orig = DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($App_To_Dock), "hwnd", WinGetHandle($DockContainer))
this only docks without sizing.
cheers,
Stef
···
On 27-01-2010 07:10, Tom wrote:
I would be interested to know how you dock a foreign app. in a
wxpython MDI frame...
Can you share some info/code on this?