New topic: Visual Basic Coder Question
<http://forums.realsoftware.com/viewtopic.php?t=38205> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message Koopa Post subject: Visual Basic Coder QuestionPosted: Sat Mar 19, 2011 6:08 am Joined: Sat Mar 19, 2011 5:57 am Posts: 2 I'm a Visual Basic kind of guy(For now) and I tried, keyword, tried to use some knowledge I have from VB, and put it into RS, so, Type Mismatch error expected boolean, but got RadioButton1 If Radiobutton1 Then TextField2.Text = "100" I want to make it so If you check off "RadioButton1" then the text in TextField2 will equal "100." How do I do this? Thanks in advance, ~KooPa EDIT* I searched Google, and thought this would help, it got rid of the error, but it doesn't make TextField2's text say "100." if RadioButton1.value = true Then TextField2.Text = "100" Last edited by Koopa on Sat Mar 19, 2011 6:14 am, edited 1 time in total. Top jefftullin Post subject: Re: Visual Basic Coder QuestionPosted: Sat Mar 19, 2011 6:14 am Joined: Wed Nov 15, 2006 3:50 pm Posts: 2204 Location: England Controls in VB have a 'default property' , which is what the language will assume you want if you refer to the control. For labels and textboxes, the default property is .text For checkboxes, it is .checked or .value and so on. RB does not attempt to 'guess' which property you might be hoping for, you need to be explicit. So if you want the value property , you need to say Radiobutton1.value instead of just Radiobutton1 _________________ RB2009 R5.1 and RB2008 Mac 10.6 + Windows 7/XP + Ubuntu Linux in Vmware on a Macbook 2.16 Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
