PDA

View Full Version : Show stringvariable in massage box


FY
07-13-2003, 03:47 PM
i made a dialog box where the user can select an output folder. now i want it to show this path as a text in this box. which type of box or command must i use?

Alex Morris
07-14-2003, 12:59 PM
You can just use a label in the dialogue - not sure what the best way is to truncate the file path though, unless you have really wide buttons;)

Another way would be to change the caption for the folder button, but only if you want the user to press it once.

I dont have max open right now but (you need to check the syntax) something like this :

on folderbutton pressed do
(
folderbutton.caption = variable assigned from folder import dialogue

or

label.text = the same
)

FY
07-15-2003, 12:30 AM
the label and button captions are only static. i can't change them. i tried the following but it doesn't work:

rollout test "Untitled" width:162 height:300
(
label test "old" pos:[21,152] width:118 height:26
test_caption = "new"
)
createDialog test width:162 height:300


test_text= "new" also does't work

magicm
07-15-2003, 10:47 AM
a little typo ;)

test_caption = "new"

should be:

test.caption = "new"


- Martijn

FY
07-15-2003, 12:42 PM
ooops you're right :blush:
but test.caption = "new" also doesn't work
:hmm:
i searched many scripts for variable strings in message boxes now, but i haven't found a single one. can somebody help me pleeeeease?

Kramsurfer
07-16-2003, 11:47 PM
try this:


(
rollout Test2 "test"
(
label LB1 "Save to"
label FolderName "Folder name"
button SelFolder "Select Folder" width:220

on SelFolder pressed do
(
FPname = getSavePath caption:"Save file to folder"

FolderName.text = FPname -- Changes name on label object.
SelFolder.caption = FPname -- Changes name on button.

)
)
createdialog Test2 300 200
)

You'll see how both the label and button work!

Enjoy

Keith Morrison

FY
07-17-2003, 03:51 AM
yes, yes, yes. it works! :applause:
thanx man :beer:

CGTalk Moderation
01-15-2006, 04:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.