PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: SeaVipe on December 19, 2020, 04:42:22 PM

Title: WinFBE 2.1.7 - MainMenu
Post by: SeaVipe on December 19, 2020, 04:42:22 PM
Hi Paul, I'm having difficulty with the following code:


' 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.


' 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.
Title: Re: WinFBE 2.1.7 - MainMenu
Post by: Paul Squires on December 19, 2020, 07:21:01 PM
Thanks Clive,

I now have this fixed. It will be in the next update.
Title: Re: WinFBE 2.1.7 - MainMenu
Post by: SeaVipe on December 19, 2020, 07:29:27 PM
Thanks, Paul.