|
Matrix
Nov 18, 2018 14:12:23 GMT -5
Post by cronos on Nov 18, 2018 14:12:23 GMT -5
Hi
I've written this simple matrix which works. What I'm wondering is, how can I use a prompt command to enter values into the relevant textboxes? I've attached my code.
Thank you
Robert
'Matrix Multiplication
nomainwin UpperLeftX = 139 UpperLeftY = 225 WindowWidth = 350 WindowHeight = 200 BackgroundColor$ = "Buttonface"
button #1.run, "Run", [Run], LR, 25, 15, 40, 30
statictext #1.1, "Row:", 10, 30, 35, 25 statictext #1.2, "Column:", 150, 30, 45, 25 statictext #1.3, "Result:", 220, 30, 35, 25
textbox #1.1, 10, 55, 30, 20 textbox #1.2, 50, 55, 30, 20 textbox #1.3, 90, 55, 30, 20
textbox #1.4, 155, 55, 30, 20 textbox #1.5, 155, 85, 30, 20 textbox #1.6, 155, 115,30, 20
textbox #1.R, 220, 55, 30, 20
open "Matrix" for window as #1 [Run] 'prompt "Enter a number"; number1
print #1.1, "!contents? number1" print #1.2, "!contents? number2" print #1.3, "!contents? number3" print #1.4, "!contents? number4" print #1.5, "!contents? number5" print #1.6, "!contents? number6"
number7 = (number1 * number4)+(number2 * number5)+(number3 * number6)
print #1.R, number7 print #1, "trapclose [quit]" wait
[quit] close #1 end
|
|
|
Post by cronos on Nov 18, 2018 14:18:34 GMT -5
Hi
I've figured this out myself!
Robert
|
|
|
Matrix
Nov 19, 2018 16:17:49 GMT -5
Post by cronos on Nov 19, 2018 16:17:49 GMT -5
Hi All
Another quick question. I've checked in the help files and Wiki and cannot find the answer. How would I save the information in a textbox so that when I turn my machine off and switch on again it has saved the information. I'm sure I've done this before but I'm returning to programming after a long break!
Thank you
Robert
|
|
|
Matrix
Nov 19, 2018 20:51:48 GMT -5
Post by Brandon Parker on Nov 19, 2018 20:51:48 GMT -5
Robert, You will need to store the information to a file and then open the file and load that information back into the TextBox the next time your program loads.
{:0)
Brandon R. Parker
|
|
|
Matrix
Nov 20, 2018 15:57:34 GMT -5
Post by cronos on Nov 20, 2018 15:57:34 GMT -5
Thanks Brandon. I'll have a go at that.
|
|