vb.net - Move all Button objects down 100px on CheckBox tick? -
i'm trying move set of 30 buttons downwards 100px when textbox ticked (and origins when box unticked). provide room labels below buttons if user requires it... "show hints" box here: http://www.phonemicchart.com/
i have next code:
private sub checkbox1_checkedchanged(byval sender system.object, byval e system.eventargs) handles checkbox1.checkedchanged if checkbox1.checked = true button5.location = new point(100, 100) label1.visible = false else button5.location = new point(300, 300) label1.visible = true end if end sub
the problem new point() function. new point -100px relative origin, , else statement button5.location = origin.
what commands can utilize accomplish this?
another idea...put buttons within panel
, changed .top
property of move within it.
private sub checkbox1_checkedchanged(byval sender system.object, _ byval e system.eventargs) handles checkbox1.checkedchanged if checkbox1.checked panel1.top += 100 else panel1.top -= 100 end if end sub
vb.net visual-studio-2010
No comments:
Post a Comment