Anders Wallin wrote:

>John Prentice wrote:
>  
>
>>(a) There are occasions when the UI benefits from being bi-directional. 
>>    
>>
>
>Yes. But I don't know how to program a bidirectional slider or other 
>widget yet. Maybe someone else can help ?
>
>  
>
I did some of this in Tk/tcl for a nuclear science project.  It is quite 
tricky.  I have
a c++ program that backs up the tk/tcl GUI, and handles all "database" 
functions.
When you switch to talk to another device, all the buttons, sliders, 
some labels,
etc. all have to be updated.  Unfortunately, c++ "mangles" procedure 
names before
passing the code to the linker.  So, you need a "wrapper" to connect the 
GUI procedure
calls to the mangled name that the linker knows the desired procedure by.

I'm guessing that some of the same tricks are needed for Python.  In Tk, 
you bind
various widgets to mouse clicks, but you can also assign a variable to 
the widget,
and any change of that variable will update the widget.  So, you pass 
the pointer
to the variable to the C program in a procedure, it changes what that 
pointer
points to, and the slider moves, the text in a box changes, etc.

Jon

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to