Iterate through GUI elements

hey there,

anybody knows if this is possible?:

I got 4 Buttons (for example):

rollout rollThumbs "Thumbnails"
(
button start "GO!" height: 150 width: 150 across:2
button ImageButton1 "" height: 150 width: 150 across:2
button ImageButton2 "" height: 150 width: 150
button ImageButton3 "" height: 150 width: 150 across:2
button ImageButton4 "" height: 150 width: 150

on start pressed do
(
for i = 1 to xxx;
do
(
rollThumbs.imageButton+(i As String).images = #(openBitmap xxx...)
)

so I can asign images to those 4 Buttons in the for looop without picking them
each by itself!?

greetings

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

...

try(destroyDialog ::rollThumbs)catch()
rollout rollThumbs "Thumbnails"
(
	button start "GO!" height:20 width:50 pos:[5,5]
	button ImageButton1 "" height: 50 width: 50 pos:[5,30] border:off
	button ImageButton2 "" height: 50 width: 50 pos:[5,85] border:off
	button ImageButton3 "" height: 50 width: 50 pos:[5,140] border:off
	button ImageButton4 "" height: 50 width: 50 pos:[5,195] border:off
	on start pressed do
	(
		for c in rollThumbs.controls where c.name != "start" do
		(
			bmp = (bitmap 50 50 color:(random black white))
			c.images = #(bmp, undefined, 1,1,1,1,1 )
		)
	)
)
createdialog rollThumbs 60 250 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow) 

bga

docJones's picture

hey, it works! Thx :)

hey,

it works! Thx :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.