Hello,

Last time I built GUI with Scilab, I did not find a comprehensive website or book on the subject and resorted to a bunch of separate sources (see Nikokay's answer).
Here are a bunch of issues/tricks I learned by trial & error:

- as for now, you cannot export uicontrols using the figure menu or the "xs2svg, xs2png, ..." functions. It means that for example if you put two frames side by side, one with buttons, the other one with a plot (an axis), you'll get a blank image if you export it. It's quite inconvenient when trying to build a documentation with visual examples.

- the documentation for gridbag layout constraint is just useless ( https://help.scilab.org/docs/6.0.0/en_US/gridbag_constraints_properties.html ), but this layout is just the best in term of functionalities and flexibility. It took me a lot of time to half understand how it works, reading java documentations and trying to fill-in the gaps.

- There is a nice trick to get a responsive GUI even if your callback functions take some time to execute. The idea is, from within the callback function, to first disable the callback function of the uicontrol, run the long calculation and then re-enable the callback. That way you avoid getting a huge amount of events and callbacks that accumulate and lag behind the actions of the user. As an example, imagine a slider where the callback function runs a 500ms-long calculation and plot the results on a graph. If you don't apply the trick described above, sliding the slider can generate 10's of events in a fraction of a second and then you have to wait for all the calculations and plotting to finish in order to get back to a usable GUI.

Hope it helps,

Antoine

Le 24/01/2018 à 19:49, Claus Futtrup a écrit :
Hi Scilabers

Is there a comprehensive manual or book (in English, or alt German) about programming GUI in Scilab? (or a comprehensive web-page)

I've found the Openeering one (18 pages):
http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf
... and I've looked at the help pages for uicontrol + run some of the GUI demos in Scilab.

I have almost no background in GUI programming, nothing successful anyway, but it could be nice if I could at least get some basic GUI up running (e.g. a figure where one can manage some controls on the left side + see the polar plot etc on the right side).

I think that what I need is not just examples. I need explanations, and preferably something coherent that I can combine and work with, into something that works.

I've installed GUI builder from ATOMS. In the past I've never been happy with programming on a high level. I prefer to understand what goes on under the hood... so GUI builder is a bit of a desperate grasp on my part.

Best regards,
Claus


_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

 Antoine Monmayrant LAAS - CNRS
 7 avenue du Colonel Roche
 BP 54200
 31031 TOULOUSE Cedex 4
 FRANCE

 Tel:+33 5 61 33 64 59
email : antoine.monmayr...@laas.fr
 permanent email : antoine.monmayr...@polytechnique.org

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to