Hello Guest it is September 27, 2023, 09:47:14 PM

Author Topic: Editable text for label  (Read 1120 times)

0 Members and 1 Guest are viewing this topic.

Editable text for label
« on: March 26, 2021, 09:30:55 PM »
I'm looking for a way to edit the text in a user defined label. I want it to work similar to a dro where once it is selected text can be input. Then the text can be called on from scripts.

Is this something that is possible with mach3? If it's not possible with oem functions has someone come up with a workaround?

Offline TPS

  •  2,437 2,437
    • View Profile
Re: Editable text for label
« Reply #1 on: March 27, 2021, 03:03:48 AM »
you can only do it by placing a tranparent button above the Label and run a script to read, Change (by using a Dialog) and
write back the entered text to the Label

Code: [Select]
text = GetUserLabel(25)

Begin Dialog EnterText 420,120,160,96,"Enter Text"
   OKButton 30,68,40,14
   CancelButton 90,68,40,14
   TextBox 8, 26, 146, 18, .FText
End Dialog

  Dim Dlg1 As EnterText
  Dlg1.FText = text
  Button = Dialog (Dlg1)
  If Button = 0 Then Exit Sub

SetUserLabel(25, text)
something like this, not tested, should work.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.