New topic: 

SegmentedControl Default?

<http://forums.realsoftware.com/viewtopic.php?t=37969>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        bsumpter          Post subject: SegmentedControl Default?Posted: 
Sun Mar 06, 2011 6:50 pm                         
Joined: Sun Mar 06, 2011 6:37 pm
Posts: 1                Hello.

I'm having a go at RealBasic, and I have a quick question concerning the 
SegmentedControl. How do you set the default selected index? I've read for 
hours and can't seem to make heads or tales out of this control. 

All help appreciated.   
                             Top                 Specialised          Post 
subject: Re: SegmentedControl Default?Posted: Sun Mar 06, 2011 10:23 pm         
                        
Joined: Thu Aug 26, 2010 6:57 am
Posts: 136
Location: Sydney Australia                I too have had this issue and there 
is no "default" to speak of. Something like 
Code:me.value = SomeValue
Would be logical as this is how you can change between page panels.
I rarely use something like segmented controls without a page panel so I simply 
set the pagepanel to the value I want initially.
I ended up creating my own module that allows me to configure a strip of bevels 
and import all the icons necessary at runtime. Segmented control is new and not 
very useful, at least to me.      
_________________
Regards

Chris Musty
Specialised Technologies Pty Ltd

Software | Electronics | IT | Multimedia

http://www.specialised.net.au
-----------------------------------------------
RB 2010 r5 Enterprise on Win7, Ubuntu 10.10 on Virtualbox  
                             Top                 swort          Post subject: 
Re: SegmentedControl Default?Posted: Sun Mar 06, 2011 10:38 pm                  
       
Joined: Mon May 31, 2010 5:35 am
Posts: 657                you have to set it manually like this:
Code:dim s as SegmentedControlItem
s = SegmentedControl1.items(0)
s.selected = True


Where "SegmentedControl1" will be the name of your segmentedcontrol.
The "items(0)" says the 1st button will be selected as it's 0-based.      
_________________
SWORT™, it stands for Secure Web Object Realtime Transfer™
- Windows Vista AND Linux Ubuntu 10.04 LTS
- REAL Studio Enterprise and WEB Edition
I dont like to use PLUGINS (altrough i have a few)  
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 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]

Reply via email to