So I've got a scrollview with a couple buttons inside.
The test button when clicked, will pop up with a msgbox2. Depending on the answer of that msgbox (in this case, positive), I would like the SellBottle button to go invisible.
SellBottle.Visible = False doesn't seem to work.
Sub fillScrollView
Dim inventorypanel As Panel
inventorypanel = ScrollView1.Panel
If Store.BottleCount > 0 Then
SellBottle.Initialize("SellBottle")
inventorypanel.AddView(SellBottle,0,0,95%x,150)
SellBottle.Text = "Bottles of Oil: " & Store.BottleCount
SellBottle.TextSize = 12
SellBottle.Gravity = Bit.Or(Gravity.LEFT, Gravity.CENTER_VERTICAL)
End If
testbutton.Initialize("testbutton")
inventorypanel.AddView(testbutton,0,160,95%x,150)
testbutton.Text = "test button"
testbutton.Gravity = Bit.Or(Gravity.LEFT, Gravity.CENTER_VERTICAL)
End Sub
Sub testbutton_Click
testbuttonresult = Msgbox2("test","test","positive","","Negative",Null)
If testbuttonresult = DialogResponse.POSITIVE Then
SellBottle.Visible = False
End If
End Sub
Any help with this would be greatly appreciated! Thanks
The test button when clicked, will pop up with a msgbox2. Depending on the answer of that msgbox (in this case, positive), I would like the SellBottle button to go invisible.
SellBottle.Visible = False doesn't seem to work.
Sub fillScrollView
Dim inventorypanel As Panel
inventorypanel = ScrollView1.Panel
If Store.BottleCount > 0 Then
SellBottle.Initialize("SellBottle")
inventorypanel.AddView(SellBottle,0,0,95%x,150)
SellBottle.Text = "Bottles of Oil: " & Store.BottleCount
SellBottle.TextSize = 12
SellBottle.Gravity = Bit.Or(Gravity.LEFT, Gravity.CENTER_VERTICAL)
End If
testbutton.Initialize("testbutton")
inventorypanel.AddView(testbutton,0,160,95%x,150)
testbutton.Text = "test button"
testbutton.Gravity = Bit.Or(Gravity.LEFT, Gravity.CENTER_VERTICAL)
End Sub
Sub testbutton_Click
testbuttonresult = Msgbox2("test","test","positive","","Negative",Null)
If testbuttonresult = DialogResponse.POSITIVE Then
SellBottle.Visible = False
End If
End Sub
Any help with this would be greatly appreciated! Thanks