Hello,
Im looking for swaping (by code) the x,y coordonate of some 2 draggableview which was initialy created with the loop below :
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
for example to swap the positions of 2 and 3 view, i thought first to swap the 2 data : panx(i), pany(i)
and next remove and re create the 2 views with something like :
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
if its the good manner, how to remove button and the dv associated before to create it again?
Regards
Take care ?
Michel
			
			Im looking for swaping (by code) the x,y coordonate of some 2 draggableview which was initialy created with the loop below :
			
				B4X:
			
		
		
		nbbut = 4
    For i=0 To nbbut - 1
        btns(i).Initialize("button")
        btns(i).Text = "Button:" & i
        btns(i).TextColor = Colors.Black
        btns(i).Color = coul(i)
        btns(i).Tag = i
        panx(i) = 50dip + ((wb + 10)*i)
        pany(i) = 130dip
        panw(i) = wb
        panh(i) = hb
        panel0.AddView(btns(i), panx(i), pany(i), panw(i), panh(i))
        dv(i).Initialize(Activity, btns(i), Colors.Transparent, panx(i), pany(i), i)
    Next
	for example to swap the positions of 2 and 3 view, i thought first to swap the 2 data : panx(i), pany(i)
and next remove and re create the 2 views with something like :
			
				B4X:
			
		
		
		'remove
btns(i).removeviews '**********
dv(i).remove '******************
'create again
panel0.AddView(btns(i), panx(i), pany(i), panw(i), panh(i))
dv(i).Initialize(Activity, btns(i), Colors.Transparent, panx(i), pany(i), i)
...
	if its the good manner, how to remove button and the dv associated before to create it again?
Regards
Take care ?
Michel