Radio Button autoplat media studio 6
Radio Button
for example
download interfaz
Hello could do as the code?
The images are really understands the example
Only you must select one of three, rather than three at the same time
![]()
Professional Software Development Tools
Radio Button autoplat media studio 6
Radio Button
for example
download interfaz
Hello could do as the code?
The images are really understands the example
Only you must select one of three, rather than three at the same time
![]()
Last edited by luffymk; 10-14-2007 at 12:11 AM.
for example details
![]()
Put this in the On Click event of Button 1
Put this in the On Click event of Button 2Code:Button.SetState("Button2", not Button.GetState(this)) Button.SetState("Button3", not Button.GetState(this))
Put this in the On Click event of Button 3Code:Button.SetState("Button1", not Button.GetState(this)) Button.SetState("Button3", not Button.GetState(this))
Code:Button.SetState("Button1", not Button.GetState(this)) Button.SetState("Button2", not Button.GetState(this))
Dermot
I am so out of here
when using radio buttons/check boxes, i usually make a global function to control the button states (saves on lines of code when you have many buttons, and if you add more buttons half way through a project you only have 1 function to edit rather than loads of buttons)
EG: (put in global functions)
and in all the buttons on click eventCode:function SetRadioState(CURRENT) -- set all buttons up Button.SetState("Button2", 0) Button.SetState("Button2", 0) Button.SetState("Button3", 0) -- set the required button down Button.SetState(CURRENT, 1) end
Code:SetRadioState(this)
Open your eyes to Narcissism, Don't let her destroy your life!!
^^
![]()
Never know what life is gonna throw at you.
(Based on a true story.)
Thanks
Heres a better function for the very same thing, this function dosent ever need be edited, it works on groups of buttons (idea from worms xp sidebar example)
Example callCode:function SetButtonState(GROUP, CURRENT) tblObjects = Page.EnumerateObjects() Application.SetRedraw(false) for index, object in tblObjects do if String.Left(object, String.Length(GROUP)) == GROUP then ObjectType = Page.GetObjectType(object) if ObjectType == OBJECT_BUTTON then Button.SetState(object, 0) end Button.SetState(CURRENT, 1) end end Application.SetRedraw(true) end
and heres a example apz showing the function in actionCode:SetButtonState("CHK", this)
Last edited by RizlaUK; 02-01-2009 at 11:35 AM.
Open your eyes to Narcissism, Don't let her destroy your life!!
Thanks for the example, it's mirrored on amsuser.com, here:
http://www.amsuser.com/ams/examples/...dioButtons.apz
Intrigued
No ProblemThanks for the example![]()
Open your eyes to Narcissism, Don't let her destroy your life!!