iOS Question Menu ios :-)

ivanomonti

Expert
Licensed User
Longtime User
Hi Ian,

but certainly the click event of textField is a disaster, I hand everything from corrections to the proposed ios, I wish I propose only the picker.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
why is the click event a disaster??
works very fine for me, you can create your menu in designer and but some buttons with the same clickevent, put a value to button.tag
and get the value via Sender like this u got only 1 click event and should work very well

i use it like this in my apps and the good thing is you can costumize it as you want not like picker where it is not costumizeable...

B4X:
sub btn_click

dim b as button = Sender

if b.tag = "button1" then 'first button in Menu was clicked
.... 'here what you want to do when button1 was clicked
else if b.tag = "button2" then 'second button in Menu was clicked
... 'here what you want to do when button2 was clicked
end if

end sub


example:
device-2013-07-23-103525.png
 
Upvote 0

ivanomonti

Expert
Licensed User
Longtime User
Use the menu add voice to put in a textfield, the click and be the textfield not a button.

Listener.png
 
Upvote 0

ivanomonti

Expert
Licensed User
Longtime User
hi Erel,

I do not understand, I can take a trivial example


B4X:
dim tx2 as TextField
 tx2.Initialize("tx2")
    tx2.Text = "Categoria"
    tx2.Tag = tx2.Text
    tx2.ShowClearButton = True
    pane.AddView(tx2,l,t,w,h)

How can I disable all the controls of the object
 
Upvote 0

ivanomonti

Expert
Licensed User
Longtime User
I solved it by putting a button in the add textFied

Listener.png


B4X:
    tx2.Initialize("tx2")
    tx2.Text = ""
    tx2.HintText = "Categoria"
    tx2.Tag = tx2.HintText
    pane.AddView(tx2,l,t,w,h)
   
    Dim btx1 As Button
    btx1.Initialize("btx1",btx1.STYLE_CONTACT_ADD)
    btx1.Text = ""
    pane.AddView(btx1,(w-22),t,50,h)
 
Upvote 0
Top