PDA

View Full Version : Python UI docs?



sami
02-02-2014, 07:59 PM
Have I missed it - does it exist? Can anyone please tell me where to find the Python documentation/syntax for creating LW specific UIs? I mean sort of equivalent to the LScript docs - something that mentions all the things like load_ctl and the python way to make these controls.

I'm having a somewhat hard time porting my LScript UIs to Python and the panel does weird stuff like auto-sizing and things that don't occur in LScript. I'm sure it's just me not understanding anything, but I couldn't find anything in the .html files or in the sample py scripts in the support/plugins folder. thx! :)

sami
02-02-2014, 09:20 PM
Found this and it was helpful :)
http://justaddmilk.org/?p=122

But I'm trying to find out what the syntax for ctldistance is in Python.... Is there a comprehensive list somewhere?

sami
02-02-2014, 09:28 PM
found it by guessing. In case there are no docs and someone else is wondering, the equivalent of Lscript's ctldistance() is dist_ctl("Some Label")

like this:


self.ctl_WaveHeight = self.myPanel.dist_ctl("Waveform Height:")

oliverhotz
02-02-2014, 11:39 PM
old but sweet.. all there:

https://home.comcast.net/~erniew/lwsdk/docs/globals/panel.html

sami
02-03-2014, 04:54 PM
thanks for the link! :)

One question, this is all C++ from the SDK, so how do you translate to Python? I mean is it all just lowercase but same syntax?

this doc says
c = DIST_CTL( pf, pan, label )

so that goes to
self.myPanel.dist_ctl("my label")

are there any other quirks / language differences I should know about, or any python specific issues relating to the Panels functions? thx!

sami
02-03-2014, 05:25 PM
Also, does anyone know the LScript equivalent of ctlinfo? I can't seem to find it.

I'd like a control that I can draw on, which I can refresh (requpdate or whatever the Python equivalent is) independently of other controls or the whole panel itself.