the following script

datafield=hk_thisform.get_pyvisible("champ_2")
datafield.set_value("erty")

in  the on_click of a button does write "erty" in the lineedit field "champ_2"

(see in help the chapter : How to load a file content into a field using a 
filedialog)


...but the same script in the on-open of the lineedit field or of the form did 
not succeed

Of course you should calculate a string variable of ore:minuti you want to 
write, and then call it to be fed to the lineeditfield.
The trick is in the get_pyvisible

contialdo skribis :



Hi,

sorry.... my script is so trivial that I did not think it could help...

minuti=hk_thisreport.datasource().column_by_name("durata").asinteger()
ore=minuti/60
hk_this.set_value(XXX)

I tried several things instead of XXX, but nothing worked. And I could not
find any document describing how to pass arguments to the set_value function
(my fault, I am sure). In the form I have simply %VALUE% in the value field.

I still have to make some more trivial computation, but I have not finished,
as I could no find the way of printing both ore and minuti in the same
field, or in two different ones, if that helps.

I wish I could have some more documents and or examples. I have been using
the three examples I found and those have been really useful. Anybody can
share anything out there?

Regards,
Aldo
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Hk-classes-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss

Reply via email to