ITALIANO
Molte grazie stefano per le risposte.
Nella primo caso non mi ero spiegato bene.
La domanda è :
layout : sample.bal 32x480, con 2 bottoni.
Il primo posizionato a left=0, top=0, height=50, width=100
Il secondo posizionato a left=0, top=130, height=60, width=100
Mi serviva conoscere l'altezza reale del layout, considerando che nel panel (del codice allegato) ci inglobo l'intero layout.
Risultato = top_ultimo_bottone + height_ultimo_bottone = 190
quindi al codice postato era sufficiente aggiungere la riga :
uheight=pnl.GetView(i).Height che sommata al pnl.GetView(i).Top mi restituisce l'effettiva altezza del layout.
Non so perchè non ci avevo pensato prima!!!
Per la seconda domanda il mio problema nel mettere in un code module è che nella sub del modulo si deve fare riferimento ad una vista posta in una activity. Nel code module non posso far riferimento a oggetti dell'activity. Credo!
io vorrei fare :
modf.AddLayoutToSV(scvMain, "aempty", False, "xxx", Colors.Red, Colors.White)
modf=code module
ENGLISH
Many thanks to Stefano for the answers.
In the first case I had not explained it well.
The question is:
Layout: sample.bal 32x480, with 2 buttons.
First placed in left = 0, top = 0, height = 50, width = 100
Second plaved in left = 0, top = 130, height = 60, width = 100
I needed to know the actual height of the layout, whereas in panel (code attached) we incorporated the entire layout.
Result = top_last_button + height_last_button = 190
then the code was posted just add the line:
uheight = pnl.GetView(i).Height that added to the pnl.GetView(i).Top returns the effective height of the layout.
I do not know why I had not thought of before!
For the second question my problem in putting in a code module that is in the sub module is to be referred to a view puts in a activity. In the code module can not refer to objects of Activity. I believe!
I would like to do:
modf.AddLayoutToSV (scvMain, "aempty", False, "xxx", Colors.Red, Colors.White)
modf = code module
Ciao
Enrico