PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WinFBE 2.1.7 - MainMenu  (Read 487 times)

SeaVipe

  • Senior Member
  • ***
  • Posts: 397
  • Windows 10
WinFBE 2.1.7 - MainMenu
« on: December 19, 2020, 04:12:22 PM »

Hi Paul, I'm having difficulty with the following code:
Code: [Select]

' Rename all of the items in the File menu
Dim byref mnuFile as wfxMenuItem = frmMain.MainMenu.ByMenuName("mnuFile")


for i as long = 0 to mnuFile.MenuItems.Count - 1
   mnuFile.MenuItem(i).Text = "Paul"
   
'Dim x As String = mnuFile.MenuItem(i).Text ' Uncomment this line will crash app.
'? mnuFile.MenuItem(i).Text ' Uncomment this line will crash app.


next
Your sample code above works as designed so I can SET but not GET.
Any GET like the following will crash my app.

Code: [Select]
' In a For Loop
? frmMain.MainMenu.ByMenuID(i).Grayed


' This will not crash app:
frmMain.MainMenu.ByMenuID(i).Grayed = True


I want to extract the Text value from each menu item then use that value to set the Checked state based on a variable. Perhaps there is no GET? I haven't tried this with WinFBE 2.1.8.
Logged
Clive Richey
You're Either Part Of The Solution, Or You're The Problem.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9387
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.1.7 - MainMenu
« Reply #1 on: December 19, 2020, 06:51:01 PM »

Thanks Clive,

I now have this fixed. It will be in the next update.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

  • Senior Member
  • ***
  • Posts: 397
  • Windows 10
Re: WinFBE 2.1.7 - MainMenu
« Reply #2 on: December 19, 2020, 06:59:27 PM »

Thanks, Paul.
Logged
Clive Richey
You're Either Part Of The Solution, Or You're The Problem.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!