[Scilab-users] ?==?utf-8?q? GUI help

Samuel Gougeon sgougeon at free.fr
Thu Nov 28 20:50:36 CET 2019


Le 28/11/2019 à 08:57, Antoine Monmayrant a écrit :
> Hello Claus,
>
> I've been playing a bit with GUIs for teaching, so maybe I can help.
> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic.
> Do not hesitate to rephrase your issue, I'll try a more focused answer.
>
> Anywya, here is how I think your code could be improved:
>
> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button.
> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback)
> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol.


get() and set() can now use a tagsPath, that might be less ambiguate 
than using findobj(), that returns the first component with a matching 
tag (unless only unique tags are defined). The documentation of set() is 
being overhauled <http://bugzilla.scilab.org/show_bug.cgi?id=15414>. You 
may have a look to it there 
<http://bugzilla.scilab.org/attachment.cgi?id=4997>. The same work on 
the get()'s page is pending 
<http://bugzilla.scilab.org/show_bug.cgi?id=15226>.


> .../...
> I attached a small gui I use to illustrate optical anti-reflection coating.

There won't never be too much physics on FileExchange, you know :-)


A physicist


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191128/34cb75a6/attachment.htm>


More information about the users mailing list