Tkinter Window On Top

T

Trevor

Can a Tkinter application create a COM object and keep its own window
on top of it?

excel = win32com.client.Dispatch('Excel.Application')

I would like the user to be able to see and interact with the Excel
application but keep the Tkinter application on top.
 
G

Gabriel Genellina

Can a Tkinter application create a COM object and keep its own window
on top of it?

excel = win32com.client.Dispatch('Excel.Application')

I would like the user to be able to see and interact with the Excel
application but keep the Tkinter application on top.

I don't know how to do that directly with tk, but I'd use the SetWindowPos
function: http://msdn.microsoft.com/en-us/library/ms632673(VS.85).aspx
The tricky part is to get the right hwnd, this seems to work:
.... win32con.HWND_TOPMOST,
.... 0,0,0,0,
.... win32con.SWP_NOMOVE | win32con.SWP_NOSIZE)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top