Android Question [SOLVED] Error.... Panel1.top = xxxxx

figorra

Member
Licensed User
Longtime User
I'm trying to modify the panel1 potition in this code.

B4X:
Sub Globals
.
.
.
.
Private panel1 As Panel
Private caja As ImageView
.
.
.
.
End sub

B4X:
Sub Activity_Create(FirstTime As Boolean)
.
.
.

panel1.Initialize("EventoPanel")
ConfiguraObjetos

.
.
.

End Sub

B4X:
Sub ConfiguraObjetos

   AltoPantalla = Activity.Height
   AnchoPantalla = Activity.Width
   
   img_fondo.Height = AltoPantalla
   img_fondo.Width = AnchoPantalla
   img_fondo.Top = Alto_img_fondo
   
   img_cabecera.Top = Alto_img_cabecera
   img_cabecera.Width = AnchoPantalla
   
   panel1.Top = (AltoPantalla * Alto_Panel1) / 100
   panel1.Left = (AnchoPantalla - panel1.Width) / 2
   
.
.
.
   
End Sub

In the line " panel1.Top = (AltoPantalla * Alto_Panel1) / 100" I receive this error....



If I delete o comment this line, the program run, but my objet is not positioned.

Sorry for my english


SPANISH

Según los códigos de arriba, cuando trato de cambiar la línea top de panel1, me lanza el error que está arriba.

En el diseñador tengo el objeto creado y tiene el mismo nombre (no es problema de mayusculas, etc..) y está inicializado, etc....

No entiendo este error a que se debe

Gracias
 

figorra

Member
Licensed User
Longtime User
Yes, thx I solve this problem, but the same result.


I think is something with top value on panel1.... perhaps....
 
Upvote 0

figorra

Member
Licensed User
Longtime User
I just delete the initialize line.......

This create a new objetc, then send the error....

THX
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…