I am working on my new project called Hydra, it is intended to be a console like PowerShell and Bash for Windows, Mac and Linux and with it, it has a simple menubar, consisting of a Console, Edit and Help menu along with a context menu that pops up whenever you right click the input or result fields and because the results field is intended to show results, it has the lockText property true but the traversalOn property on and the Context and Edit menus are setup to disable menu items that cannot be used in the read only field such as Undo, Cut, Paste and Delete and thus I have a simple MouseDown handler in the Results field that goes like this:
Code: Select all
On MouseDown pButton
If pButton = 3 Then
Disable MenuItem 1 Of Button 4 // Undo
Disable MenuItem 3 Of Button 4 // Cut
Disable MenuItem 5 Of Button 4 // Paste
Disable MenuItem 6 Of Button 4 // Delete
Popup Button 4
End If
End MouseDown
Code: Select all
On MouseDown pButton
If pButton = 3 Then
If Character 1 Of Line 1 Of Button 4 <> "(" Then
Put "(" Before Line 1 Of Button 4
End If
// Rinse repeat for lines 3, 5 and 6.
If pButton = 3 Then]
Popup Button 4
End If
End If
End MouseDown
DISCLAIMER: I'm having to take meds for my tonsils and I think they've just kicked in again, so I hope this looks like English to everyone.