Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

TSE: How to use only 1 mouse button (e.g. the right mouse button) to get e.g. 2 mouse menus?

6 views
Skip to first unread message

knud van eeden

unread,
Feb 3, 2025, 3:40:02 PMFeb 3
to SemWare TSE Pro Text Editor
Hello,

FYI

TSE: How to use only 1 mouse button (e.g. the right mouse button) to get e.g. 2 mouse menus to choose from?

Steps:

1. Create e.g. the following TSE program:

---

forward menu MouseMenu1()
forward menu MouseMenu2()

proc mRightBtn()
    if WaitForMouseEvent(_MOUSE_HOLD_TIME_|_MOUSE_RELEASE_|_MOUSE_MOVE_) == _MOUSE_RELEASE_
        MouseMenu1()
    else
        // MouseMarking(_COLUMN_)
        MouseMenu2()
    endif
end

menu MouseMenu1()
   Title="Mouse Menu 1"
   "&Cut",                           Cut()                 , , ""
   "Cop&y",                          Copy()                , , ""
   "&Paste",                         Paste()               , , ""
   "Paste &Over",                    Paste(_OVERWRITE_)    , , ""
   "&UnMark",                        UnMarkBlock()         , , ""
END

menu MouseMenu2()
   Title="Mouse Menu 2"
   "&Cut",                           Cut()                 , , ""
END

PROC Main()
 // do something
END

<RightBtn>              mRightBtn()

---

2. Run the program

3. If pressing the right mouse button a short period of time you will activate the first menu

4. If pressing the right mouse button a longer period of time you will activate the second menu

5. Tested successfully in TSE 4.50.2

6. Source: tse.ui in the ui directory in TSE 4.50.2

with friendly greetings
Knud van Eeden

Reply all
Reply to author
Forward
0 new messages