Cut and Paste & Clearing a table

bish0p

Member
Licensed User
Longtime User
I have been diging around and for the most part the forums have been great for answering all of the questions I have about Basic4PPC. I must say the more I use it the more I love it.

I do however have a couple of questions.

1) how do I activate the system Cut/Paste Menu in my App
2) I am using a Table to load some XML I am parsing (a GPX file) then loading it into a SQL table. Is there a quick way to clear out the table, 1000's of rows of data, so that the user can load another?

Thanks in Advance.
 

Cableguy

Expert
Licensed User
Longtime User
You can also see the context menu in action in my INI editor, available in the "share your creations" sub-forum...
 

bish0p

Member
Licensed User
Longtime User
I think you are referring to a Context menu. This menu appears when you tap and hold over a control (same as right click).
See the TextEditor example for such implementation.

Thanks Erel,

Worked like a charm, is there a away to overload the code so that I do not have to create those three functions for every text field I want a menu for?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This kind of modularity is exactly suited to the new modules feature.
You will need to wait to the release of version 6.50 or if you like you I can send you a link to the beta version.

It is very simple to use it:
- Add the attached module to your project.
- Add references to Formlib and Hardware / HardwareDesktop (this step will not be required in the stable version).
In your code you should add something like:
B4X:
Sub Globals

End Sub

Sub App_Start
    Form1.Show
    EditMenu.Initialize("Main.Form1")
    EditMenu.AddControl("Main.TextBox1")
    EditMenu.AddControl("Main.TextBox2")
    EditMenu.AddControl("Main.TextBox3")
End Sub
 

Attachments

  • EditMenu.bas
    2.3 KB · Views: 255

bish0p

Member
Licensed User
Longtime User
This kind of modularity is exactly suited to the new modules feature.
You will need to wait to the release of version 6.50 or if you like you I can send you a link to the beta version.

It is very simple to use it:
- Add the attached module to your project.
- Add references to Formlib and Hardware / HardwareDesktop (this step will not be required in the stable version).
In your code you should add something like:
B4X:
Sub Globals

End Sub

Sub App_Start
    Form1.Show
    EditMenu.Initialize("Main.Form1")
    EditMenu.AddControl("Main.TextBox1")
    EditMenu.AddControl("Main.TextBox2")
    EditMenu.AddControl("Main.TextBox3")
End Sub


See it just keeps getting better, this is the exact reason I like this platform more and more as I use it.

James
 
Top