Panel label button listview

sultan87

Active Member
Licensed User
Longtime User
Hello,
j' added a label and a button on activity
when I click on the label I want to post a list and not to be able to click on the button
if I choose item list, the list disappears and I can again click on the button how to make?

'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.

Dim Button1 As Button
Dim ListView1 As ListView
Dim Spinner1 As Spinner
Dim Label1 As Label
Dim bmp As Bitmap

Dim Panel_Fond As Panel
Dim Panel_Cache As Panel

End Sub

Sub Activity_Create(FirstTime As Boolean)

Panel_Fond.Initialize("")
activity.AddView(Panel_Fond,0,0,100%x,100%y)

label1.Initialize("label1")
label1.Text = "Pays"
Panel_Fond.AddView(label1,10,10,200,20)

listview1.Initialize("listview1")

listview1.Clear

listview1.AddSingleLine("France")
listview1.AddSingleLine("Allemagne")
listview1.AddSingleLine("Belgique")
listview1.AddSingleLine("Suisse")
listview1.AddSingleLine("Angleterre")
listview1.AddSingleLine("Italie")
ListView1.SingleLineLayout.ItemHeight = 20dip
ListView1.SingleLineLayout.Label.TextSize = 14
' listview1.Visible = False

button1.Initialize("button1")
Panel_Fond.AddView(button1,10,300,50,30)
button1.Text = "xxxx"

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub ListView1_ItemClick (Position As Int, Value As Object)
Msgbox ("click sur list","suivi")
label1.Text = listview1.GetItem(position)
Panel_cache.Visible = False
panel_fond.Visible=True
' listview1.Visible = False

End Sub
Sub Button1_Click
Msgbox ("click sur bouton","suivi")
End Sub
Sub Label1_Click

panel_fond.Visible=False

Panel_cache.Initialize("panel_cache")
activity.AddView(Panel_cache,0,0,320,480)
Panel_cache.Color = Colors.Transparent
panel_cache.AddView(listview1,10,50,200,200)

End Sub

Sub Panel_cache_click

Msgbox ("click sur panel_cache","suivi")

End Sub

Best regards
 

vb1992

Well-Known Member
Licensed User
Longtime User
Hides your button:
================================

Button1.visible = False
Button1.Invalidate





Shows your button:
================================

Button1.visible = True
Button1.Invalidate
 
Upvote 0
Top