|
Post by milfredo on Aug 26, 2019 14:05:29 GMT -5
A bit stumped here.
'-----Begin GUI objects code
graphicbox #main.graphicbox68, 845, 27, 545, 555
statictext #main.statictext1, "Race Tracks", 155, 10, 150, 25
button #main.button2,"APX",[apxbtn], UL, 15, 47, 50, 25
later in the program as I start to load files I want to hide the #main.button2 and I use print #main.button2, "hide" But what happens is the button "APX" label turns into lable reading "hide"
Any idea why this is happening. The button is in a graphics window.
Thanks
|
|
|
Post by Chris Iverson on Aug 26, 2019 14:11:16 GMT -5
Try !hide.
Quite a few controls will accept text in some form, usually to change the text that's written on them.
For those controls, if you want to issue a command, you need to prefix it with an exclamation mark.
|
|
|
Post by milfredo on Aug 27, 2019 21:51:36 GMT -5
This is straight from the help file. print #handle.ext, "hide"
This causes the control to be hidden or invisible. I have copied it exactly except for putting my code which replaces the Handle.ext and all it does is change the label of the button and doesn't make it invisible.
|
|
|
Post by Chris Iverson on Aug 27, 2019 23:44:48 GMT -5
Like I said, try "!hide". The exclamation mark is important, for the reason I gave above.
#handle.ext, "!hide"
|
|
|
Post by Brandon Parker on Aug 28, 2019 10:43:53 GMT -5
This is straight from the help file. print #handle.ext, "hide" This causes the control to be hidden or invisible. I have copied it exactly except for putting my code which replaces the Handle.ext and all it does is change the label of the button and doesn't make it invisible. As Chris stated, use an exclamation mark in frot of the command. Any control that accepts text to be displayed on it requires an exclamation mark in front of text intended to be a command so that the Runtime Engine interprets the text as a command for the control instead of just text to be displayed on the control. When I look up the help for Button control this is what I see; the exclamation mark is definitely present. Is it possible that you are looking at the help for the wrong control, possibly the BMPButton control (those doe not require the exclamation mark)? {:0) Brandon Parker
|
|
|
Post by milfredo on Sept 1, 2019 3:18:17 GMT -5
Thanks guys. Got it working. Had a couple other coding errors which got in the way too. But all good now.
Thanks again.
|
|