rolloutCreator obj.name and ui position

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2012
rolloutCreator obj.name 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
		rci.begin()
			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]"
			)
		rci.end()
			
		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
JokerMartini@hotmail.com
www.JokerMartini.com
 
  10 October 2012
paramStr:("width:100 text:\"" + nodeName + "\" pos:[5,10]")
 
  10 October 2012
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
JokerMartini@hotmail.com
www.JokerMartini.com
 
  10 October 2012
rci.addControl #editText ("xtext"+i as string) "" paramStr:("width:100 text:\" " + nodeName + "\" pos:" + posY as string)
 
  10 October 2012
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 03:54 PM.


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