{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaGraphics/Gtk.jl/issues/258","repository_url":"https://api.github.com/repos/JuliaGraphics/Gtk.jl","labels_url":"https://api.github.com/repos/JuliaGraphics/Gtk.jl/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/JuliaGraphics/Gtk.jl/issues/258/comments","events_url":"https://api.github.com/repos/JuliaGraphics/Gtk.jl/issues/258/events","html_url":"https://github.com/JuliaGraphics/Gtk.jl/issues/258","id":180336891,"number":258,"title":"A set of Radio Buttons","user":{"login":"Ward9250","id":3399309,"avatar_url":"https://avatars.githubusercontent.com/u/3399309?v=3","gravatar_id":"","url":"https://api.github.com/users/Ward9250","html_url":"https://github.com/Ward9250","followers_url":"https://api.github.com/users/Ward9250/followers","following_url":"https://api.github.com/users/Ward9250/following{/other_user}","gists_url":"https://api.github.com/users/Ward9250/gists{/gist_id}","starred_url":"https://api.github.com/users/Ward9250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ward9250/subscriptions","organizations_url":"https://api.github.com/users/Ward9250/orgs","repos_url":"https://api.github.com/users/Ward9250/repos","events_url":"https://api.github.com/users/Ward9250/events{/privacy}","received_events_url":"https://api.github.com/users/Ward9250/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-30T15:44:49Z","updated_at":"2016-10-04T01:36:48Z","closed_at":null,"body":"Hi,\r\n\r\nThis is probably a simple one, but reading the GTK reference docs or the Gtk.jl src code it's not obvious to me, how do I create and use a simple group of 2 or 3 radio buttons to select one of a few options using this package?\r\n\r\nThanks,\r\nBen."},"comment":{"url":"https://api.github.com/repos/JuliaGraphics/Gtk.jl/issues/comments/251274014","html_url":"https://github.com/JuliaGraphics/Gtk.jl/issues/258#issuecomment-251274014","issue_url":"https://api.github.com/repos/JuliaGraphics/Gtk.jl/issues/258","id":251274014,"user":{"login":"Matt5sean3","id":7004277,"avatar_url":"https://avatars.githubusercontent.com/u/7004277?v=3","gravatar_id":"","url":"https://api.github.com/users/Matt5sean3","html_url":"https://github.com/Matt5sean3","followers_url":"https://api.github.com/users/Matt5sean3/followers","following_url":"https://api.github.com/users/Matt5sean3/following{/other_user}","gists_url":"https://api.github.com/users/Matt5sean3/gists{/gist_id}","starred_url":"https://api.github.com/users/Matt5sean3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Matt5sean3/subscriptions","organizations_url":"https://api.github.com/users/Matt5sean3/orgs","repos_url":"https://api.github.com/users/Matt5sean3/repos","events_url":"https://api.github.com/users/Matt5sean3/events{/privacy}","received_events_url":"https://api.github.com/users/Matt5sean3/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T01:36:48Z","updated_at":"2016-10-04T01:36:48Z","body":"This should work for you:\r\n\r\n```julia\r\nusing Gtk\r\n\r\nb = @GtkBox(:v)\r\nw = @GtkWindow(b, \"Test Window\")\r\nrb1 = @GtkRadioButton(\"first radio button\")\r\nrb2 = @GtkRadioButton(rb1, \"second radio button\")\r\nrb3 = @GtkRadioButton(rb1, \"third radio button\")\r\npush!(b, rb1)\r\npush!(b, rb2)\r\npush!(b, rb3)\r\nshowall(w)\r\n```\r\n\r\nAfter that, use the `active` property of the buttons to determine which button is selected and the `toggled` signal to know when the selection changes, unless I'm missing an easier way to achieve that."}}
{"actor":{"display_login":"Matt5sean3"}}