New topic: 

What is wrong with BevelButton's MenuValue?

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

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        rbasic20091005153          Post subject: What is wrong with 
BevelButton's MenuValue?Posted: Wed Apr 07, 2010 5:17 pm                        
         
Joined: Sat Apr 04, 2009 5:10 pm
Posts: 749                Hola, 

I don't often use the BevelButton control as a menu.  It can be useful in some 
cases because of its Action event, which will let you pull values from other 
controls as opposed to the PopupMenu, which must have values when it opens.  
Anyway, I'm currently working on a fairly large project.  I need to use 
BevelButton's MenuValue (equivalent to PopupMenu's ListIndex) to find out what 
the user has chosen on the menu.  But whatever I choose, the MenuValue is -1.  
In fact, there's nothing wrong with my button.  For example, LR has the 
following example.

Code:  Dim s as String
  Dim i as Integer
  Dim last as Integer
  s="January,February,March,April,May,June,July,August,September," _
  +"October,November,December"
  last=CountFields(s,",")
  Me.caption="Month"
  Me.captionalign=0 //flush left
  Me.hasMenu=2  //menu on right
  For i=1 to last
  me.addRow NthField(s,",",i)
  Next

If I start a brand-new project with this code installed in BevelButton1's 
Action event and click on PushButton1 with the following code, it will give me 
the right index value.

Code:Msgbox Str(BevelButton1.MenuValue)

But if I bring this set of controls to my current, large project, clicking on 
the Push guy regardless of BevelButton1's menu will give me -1.  Nothing works 
on my current project as far as BevelButton's MenuValue is concerned.  
BevelButton's MenuValue is so unpredictable like Drawer Window.  But I don't 
find problems if I search this place for 'BevelButton MenuValue.'

I can't believe I've wasted more than 2 hours for this.  Any suggestions?

Grrrrr...       
_________________
Mac OS X 10.5.8/REALBasic 2008 R5.1 ~ REALBasic 2009 R4
Don't MBS-spam me.  Don't plugin-spam me.  No thanks.  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
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