Edit the text on the button

sarim123

Member
Licensed User
Longtime User
Hi everyone,
I am trying to make a button that when long pressed the button's text can be edited and when the user touches away, it saves. even when the app is closed.

It doesnt have to be long pressed, any way will work for me.

Thanks! :)
 

anallie0

Active Member
Licensed User
Longtime User
At the longclick event changes the properties textbutton and then save it in a text file.
when you reopen the application read the file and applies the text to the button.
 
Upvote 0

sarim123

Member
Licensed User
Longtime User
I honestly do not know how to do this. is there an example anywhere? i looked everywhere and i cant find one. I know this is wrong but...this maybe?

B4X:
Sub Button_LongPress
If FirstTime = True Then
      If File.Exists(File.DirInternal, "Text8.txt") = True Then
         lstText = File.ReadList(File.DirInternal, "Text8.txt")
      Else
         lstText.Initialize
      End If
   End If
   FillListView

i only found it for a listview. Not a button
Can someone please help me? Thanks!
I know im a :sign0104:
 
Upvote 0

sarim123

Member
Licensed User
Longtime User
Thanks

Thank you NJDude so much!!!!!!!!! sorry i didnt see ur post.
Thanks so much though!!!!!
 
Upvote 0
Top