rolloutCreator and ui position

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 10 October 2012   #1
rolloutCreator and ui position

How do I get the object name to appear in the text field along with using the for-loop to adjust the positioning of the ui controls.

try (destroydialog ::rlObjEditor)catch()
rollout rlObjEditor "Object Lister" width:500 height:400
	fn fnPopulateList =
		local rci = rolloutCreator "rlList" "Objects" width:500 height:400
			for i = 1 to objects.count do (
				--rci.addControl #editText ("xtext"+i as string) "" paramStr:"width:100 text:\"name\" "
				nodeName = objects[i].name
				y = 20*i
				rci.addControl #editText ("xtext"+i as string) "" paramStr:"width:100 text:nodeName pos:[5,10]"
		return rci.def

	subRollout srObjEditor "" pos:[0,0] width:500 height:400
	on rlObjEditor open do (addSubRollout srObjEditor (fnPopulateList()) rolledUp:false)
	on rlObjEditor resized val do (srObjEditor.height = val[2])		
createDialog rlObjEditor 500 400 style:#(#style_SysMenu, #style_ToolWindow, #style_resizing)
____________ ___ __ _
John A. Martini
Old 10 October 2012   #2
paramStr:("width:100 text:\"" + nodeName + "\" pos:[5,10]")
Old 10 October 2012   #3
I tried to apply the same method to the pos and it didn't work? What am I missing?

nodeName = objects[i].name
posY = [0,10*i]
rci.addControl #editText ("xtext"+i as string) "" paramStr:("width:100 text:\" " + nodeName + "\" pos:\" " + posY + "\" ")

____________ ___ __ _
John A. Martini
Old 10 October 2012   #4
rci.addControl #editText ("xtext"+i as string) "" paramStr:("width:100 text:\" " + nodeName + "\" pos:" + posY as string)
Old 10 October 2012   #5
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 02:12 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.