View Full Version : Radio Button autoplat media studio 6
luffymk
10-14-2007, 12:58 AM
Radio Button autoplat media studio 6
Radio Button
for example
http://s1.subirimagenes.com/imagenes/previo/thump_15254062007-10-14_024331.png
http://s1.subirimagenes.com/imagenes/previo/thump_15254122007-10-14_025254.png
download interfaz (http://rapidshare.com/files/62417468/proyect.rar)
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
http://s1.subirimagenes.com/imagenes/previo/thump_1525424radiooo.gif
luffymk
10-14-2007, 01:16 AM
for example details
http://www.imaxenes.com/imagenes/radiooo1qe79pe.gif
Dermot
10-14-2007, 01:55 AM
Put this in the On Click event of Button 1
Button.SetState("Button2", not Button.GetState(this))
Button.SetState("Button3", not Button.GetState(this))
Put this in the On Click event of Button 2
Button.SetState("Button1", not Button.GetState(this))
Button.SetState("Button3", not Button.GetState(this))
Put this in the On Click event of Button 3
Button.SetState("Button1", not Button.GetState(this))
Button.SetState("Button2", not Button.GetState(this))
RizlaUK
10-14-2007, 02:49 AM
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)
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
and in all the buttons on click event
SetRadioState(this)
Intrigued
10-14-2007, 09:28 AM
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)
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
and in all the buttons on click event
SetRadioState(this)
Nice call there RizlaUK. :yes
RizlaUK
10-14-2007, 11:47 AM
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)
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
Example call
SetButtonState("CHK", this)
and heres a example apz showing the function in action
Intrigued
10-14-2007, 07:06 PM
Thanks for the example, it's mirrored on amsuser.com, here:
www.amsuser.com/ams/examples/GroupCheck&RadioButtons.apz
RizlaUK
10-14-2007, 07:27 PM
Thanks for the example
No Problem :yes
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.