Need help with buttons

cdogcdl

New Member
Hi, I'm a basic4android noob.

I've been making a program where the basic function is when I click a button, a panel becomes visible, and if I push another, that panel becomes invisible and the other becomes visible. The problem I'm having is that the

sub buttonname_click

does nothing,

Also I can't change visibility or enabled status of buttons or panels at all.
what am I doing wrong?

I've already declared and initialized the buttons and I am using the correct button name, there is and End Sub at the end and all that too.

PS, when I type buttonname_click, it doesn't autofix to buttonname_Click, just a sidenote.

Thanks in advance!

Cdog
 

wheretheidivides

Active Member
Licensed User
Longtime User
have master panel with 3 buttons, click button1 for panel 1 to come up. If you have these in the layout, then you do not have to initialize them. You can make these 4 panels in the laytout designer and call it 'layout01.bal'

Sub Activity_Create(FirstTime As Boolean)
'---------------------------------------------
'Display Layout
Activity.LoadLayout("layout01.bal")
end sub

sub Panel1_click
Panel1.bringtofront
Panel1.top = 0
Panel1.Left = 0
panel1.enabled = true
panel1.visble = true

Panel2.sendtoback
Panel2.top = 0
Panel2.Left = 0
panel2.enabled = false
panel2.visble = false

Panel2.sendtoback
Panel3.top = 0
Panel3.Left = 0
panel3.Enabled = false
panel3.Visble = false
end sub
 
Upvote 0
Top