Notifications
Clear all

[Closed] Organize Rollouts

this is possible to do using pure the MXS.

What a relief! Can you tell me a bit more about how that would be done?
Thanks

i can say the same – there are a lot of examples on this forum including mine. you can use subrollouts, registed rollout dialogs and rolloutfloaters, toolbars… there are many way to do it.

about languages… in our case there are only to types. language which allows to make tools and which doesn’t allow.
MXS is powerful enough to make complete tools in the MAX environment.

OMG the search option is a mess… I thought by clicking on your nickname I’d find all of your posts but no…
Guess I have to check all the threads one by one…

This is a solution that kinda works:

rollout parent “parent” height:200 width: 500
(
subrollout test1 “test1”
subrollout test2 “test2”
)
rollout test1a “test1a” width:100
(
spinner test1as “test1as” align:#left
)

rollout test2a “test2a” width:100 height: 100
(
spinner test2as “test2as” align:#left
)

createdialog parent

AddSubRollout parent.test1 test1a
AddSubRollout parent.test2 test2a

parent.test1.width = 200
parent.test1.height = 100
parent.test1.pos = [250,0]

parent.test2.pos = [0,0]
parent.test2.width = 200
parent.test2.height = 100

The problem is: if I remove the first subrollout the second stays in the middle. I’d like to have them always align to the left. Is it possible?

Google search works better. use CGTalk and my name as keywords.

I see , may our cognition different
i think jen84’s need is an embedded rollout like first image shows , is it may achieve by mxs ? i tried but got incorrect result .

i didi that effect by dotnet such as

rollout AEI_dotnetUI_example_Rot "AEI_dotnetUI_example_Rot"
(
	dotnetcontrol main_pn "panel" width:300  height:300 pos:[0,0]
	local d_CI= dotnetclass "System.Activator"
	local d_size= dotnetclass "System.Drawing.size"
	local d_pos= dotnetclass "System.Drawing.Point"
	local pos
	fn d_color_fn n = ((dotNetClass "System.Drawing.Color").FromArgb n[1] n[2] n[3])
	fn toggle s e =
	(
		if s.tag[1]==1 then
		(
			s.tag=#(0,s.tag[2])
			s.parent.height = 0
		)else
		(
			s.tag=#(1,s.tag[2])
			s.parent.height = s.tag[2]
		)
	)
	fn startdrag s e =
	(
		pos = mouse.screenpos
	)
	fn drag s e =
	(
		if (e.Button == e.Button.Left) then
		(
			s.parent.Left += mouse.screenpos.x - pos.x
			s.parent.top += mouse.screenpos.y - pos.y
			pos = mouse.screenpos
		)
	)
	on AEI_dotnetUI_example_Rot resized size do
	(
		main_pn.size =d_CI.CreateInstance d_size #(size[1],size[2])
	)
	on  AEI_dotnetUI_example_Rot open do
	(
		main_pn.backcolor = d_color_fn [50,50,50]

		rollout_top=dotnetobject "panel"
		rollout_top.size = d_CI.CreateInstance d_size #(250,250)
		rollout_top.location = d_CI.CreateInstance d_pos #(10,10)
		rollout_top.autosize = true

		label_top= dotnetobject "label"
		label_top.text = "D-click to toggle_top"
		label_top.height = 18
		label_top.backcolor = d_color_fn [170,170,170]
		label_top.dock = label_top.dock.top
		dotnet.addeventhandler label_top "DoubleClick" toggle
		dotnet.addeventhandler label_top "MouseMove" drag
		dotnet.addeventhandler label_top "MouseDown"startdrag

		panel_top=dotnetobject "panel"
		panel_top.backcolor= d_color_fn [50,50,100]
		panel_top.dock = panel_top.dock.fill
		

		rollout1 = dotnetobject "panel"
		rollout1.size = d_CI.CreateInstance d_size #(100,100)
		rollout1.location = d_CI.CreateInstance d_pos #(10,30)
		rollout1.autosize = true

		label1=  dotnetobject "label"
		label1.text = "D-click to toggle1"
		label1.dock = label1.dock.top
		label1.backcolor = d_color_fn [70,70,70]
		label1.height = 18
		dotnet.addeventhandler label1 "DoubleClick" toggle
		dotnet.addeventhandler label1 "MouseMove" drag
		dotnet.addeventhandler label1 "MouseDown"startdrag

		panel1= dotnetobject "panel"
		panel1.backcolor= d_color_fn [100,0,70]
		panel1.dock = panel1.dock.fill

		label1.tag = #(1,rollout1.height)

		rollout2 = dotnetobject "panel"
		rollout2.size = d_CI.CreateInstance d_size #(100,100)
		rollout2.location = d_CI.CreateInstance d_pos #(120,30)
		rollout2.autosize = true

		label2=  dotnetobject "label"
		label2.text = "D-click to toggle2"
		label2.dock = label2.dock.top
		label2.backcolor = d_color_fn [70,70,70]
		label2.height = 18
		dotnet.addeventhandler label2 "DoubleClick" toggle
		dotnet.addeventhandler label2 "MouseMove" drag
		dotnet.addeventhandler label2 "MouseDown"startdrag

		panel2= dotnetobject "panel"
		panel2.backcolor= d_color_fn [100,0,70]
		panel2.dock = panel2.dock.fill

		label2.tag = #(1,rollout2.height)

		label_top.tag = #(1,rollout_top.height)

		rollout1.controls.addrange #(label1,panel1) 
		rollout2.controls.addrange #(label2,panel2) 
		panel_top.controls.addrange #(rollout1,rollout2)
		rollout_top.controls.addrange #(label_top,panel_top)
		main_pn.controls.add rollout_top
	)
)
createdialog AEI_dotnetUI_example_Rot 300 300
Page 2 / 2