View Full Version : Custom dialog from text file
Mangled Poly 10-24-2006, 09:37 PM Hey Guys,
I have a text file with x or so lines of text stored in a text file(will change by case).
Now i want to take those x lines and make a rollout with them. The lines will be the text for labels. How would i go about achieving this? Examples would be great!!!
|
|
Wahooney
10-24-2006, 09:50 PM
This is done in Rollout Army Knife (http://www.wahooney.net/download.php?view.54), download it and check how I did it if you like.
Mangled Poly
10-24-2006, 09:58 PM
sorrry I guess I wasnt clear enough... I want to dynamically create the labels from the text file that will be changing by case.
ypuech
10-24-2006, 11:57 PM
Hi,
You can use Dynamic Rollout Creation ("RolloutCreator Functions" in MAXScript Reference).
This way is not easy in some cases but I think it's a good solution for your problem.
ypuech
10-25-2006, 12:04 AM
You can try :
-- Create dynamic rollout
rolloutFileLabels = rolloutCreator "rolloutDialog" "File Labels"
rolloutFileLabels.begin()
-- Open your file
NbLines = 20 -- Get number of lines in your file
for IdxLine = 1 to NbLines do
(
LabelName = "Label" + IdxLine as string
LabelText = "Label " + IdxLine as string -- Get current line text in your file
rolloutFileLabels.addControl #label LabelName LabelText
)
createDialog (rolloutFileLabels.end())
Mangled Poly
10-25-2006, 04:31 AM
Thats perfect thanks man
CGTalk Moderation
10-25-2006, 04:31 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.