Author Topic: Value of a variable in a textbox  (Read 141 times)

lesperguer

  • Member
  • *
  • Posts: 2
Value of a variable in a textbox
« on: January 05, 2022, 11:36:45 AM »
Hello new friends, I am starting in odcl, I have made a form with buttons and it works great. What I have not been able to do is put the value or the result of a variable of a lisp function in the text box, for example (setq to 10) and that the value 10 appears in the text box after it is performed an operation. I have read the tutorial of the page, but there is no case that I achieve it. I would appreciate your help in guiding me, or share some other tutorial with me. look on youtube and there is very little content that exists

From Chile
Network engineer learning programming languages to optimize my worktasks.

honkinberry

  • Full Member
  • ***
  • Posts: 165
Re: Value of a variable in a textbox
« Reply #1 on: January 06, 2022, 09:31:17 AM »
In the Studio editor, select the control, and in Properties, click the button next to (Control Browser) - that will show you all the things you can do with the control, and even copy prototypical code to the clipboard.
In the case of a Text Box, you'll want this:
(dcl-Control-SetText [project/form/control] [value as string])

--J

lesperguer

  • Member
  • *
  • Posts: 2
Re: Value of a variable in a textbox
« Reply #2 on: January 07, 2022, 09:24:56 AM »
Many thanks Honkinberry, I
« Last Edit: January 07, 2022, 09:29:26 AM by lesperguer »
From Chile
Network engineer learning programming languages to optimize my worktasks.