Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Embed TKinter on RoboDK (labels)

#1
Question 
Hi.
If I create a docked tkinter python app, the label form is not accesible via Robodk GUI, in other words It cant be writable.

   

Is there any example?
My code is: 
.py   Test.py (Size: 563 bytes / Downloads: 372)
#2
I believe this issue is specific to how you use Python/Tkinter.

I attached a sample project that shows a similar concept and writting on a label is working.

Also, one tip: when you embed a window in RoboDK I recommend you to run all RoboDK API operations in a separate thread.


Attached Files
.rdk   Example-07.b-Weld Script Graphical User Interface.rdk (Size: 2.45 MB / Downloads: 801)
#3
(11-17-2020, 03:36 AM)Albert Wrote: I believe this issue is specific to how you use Python/Tkinter.

I attached a sample project that shows a similar concept and writting on a label is working.

Also, one tip: when you embed a window in RoboDK I recommend you to run all RoboDK API operations in a separate thread.

Hi Albert, thanks for your reply.
In your example, the text field works, but if you resize the embed window the text label freezes and cant be writable.
#4
You are right... This is very strange, I'm not sure what could be causing this issue.

@Phillip, do you have any hints?
#5
Hi Albert, Hi Phillip

on Windows I have the same issue that I can't edit the fields in your library scripts "ProjectCurve2SurfaceGUI.py". if I make some minor changes in the script (e.g. SIZE_X = 500 to SIZE_X = 250) it is posiible to edit the fields one time. After pressing UPDATE button everything freezes. I'm on Windows 10 machine with Anaconda3 Installation with Python 3.7.4

Regards, Thomas
#6
Hi Thomas,

For some reason, TKinter's main loop blocks RoboDK's main loop when you embed the window. I recommend you to not embed the TKInter window to avoid these issues.

If you want to create native UI looking windows I would recommend you to look at RoboDK Plugin Interface:
https://robodk.com/doc/en/PlugIns/index.html

Albert
#7
any plan for a fix or is it not fixable?
  




Users browsing this thread:
1 Guest(s)