Hi Aaron,

    Just got back from a quick hour break to Ithaca. I did this for one reason, 
to make a universal item function for all items and to reduce space.

    Yes, I could make lots of lists, lots of checks, and I reduced a lot of if 
then's to functions, in fact 2 functions...

    so, yes, there is a dictionary, and a list in the case statements, but the 
rest is reduced to 2 function calls.

    I hope that makes it easier for you to understand. You will have to wait 
until I release the app...

        Bruce

  Sent: Friday, May 27, 2011 1:54 PM
  Subject: Re: Menu Items and Menu Group?


  Why would you go through the trouble of creating a dictionary of all your 
menu ids, when you already know what they are based on your XML?

  Aaron

  On 5/27/2011 1:41 PM, BT wrote: 

    Hi Doug,

        After asking the question I discovered that knowing all the menu items 
and such creates a problem if different types, but a dictionary of the only 
ID's you want does prevent that problem.

        So, below is how I got around the issues. the first function unchecks 
all items inside the dictionary and returns a true to set the actual menu item 
that had been selected, so it gets set true.

        Then the second function uses the dictionary to find the ID on the item 
list to find the value of that item and return the actual menu ID of that 
particular value.

        So this allows me to uncheck a selection and find the ID of a value 
corresponding to that ID...

        So, if choices then one value selects only one item and such...

        You will understand it after I post the cuckoo Clock.

        Just going one step at a time, filling in the menu items, selections, 
and the IniFile with those selections, and the reverse.

            Bruce

    Function SelectMenuItem( menuDict)
     ' Uncheck all menu items and set selected one by passing back true.
     Dim mId
     For Each mId In menuDict
      myDialogMenu.Checked( mId) = False
     Next
     SelectMenuItem = True
    End Function

    Function GetMenuItemID( menuDict, item)
     ' Return the menuItem ID of the item inside the dictionary.
     Dim mID
     For Each mID In menuDict
      If menuDict( mID) = item Then
       GetMenuItemID = mID
       Exit Function
      End If
     Next
     GetMenuItemID = ""
    End Function

      Sent: Friday, May 27, 2011 12:00 PM
      Subject: Re: Menu Items and Menu Group?


      Bruce,

      We do not expose the information you are asking for.  The reason is the 
menu object we provide is for your own dialogs.  Meaning either your entry in 
our apps menu or the menu bar in your dialog.  In either case you are the one 
that put the entries in the menu so you know what is there and how to interact 
with them.

      Doug

      On 5/27/2011 10:27 AM, BT wrote: 

        Hi!

            I still would like to know, but my dictionary function is perfect 
and requires only the items dictionary along with 4 lines of code for the 
function...
                Bruce

          Sent: Friday, May 27, 2011 8:18 AM
          Subject: Menu Items and Menu Group?



          Hi!

              I discovered in my app manager in the help menu that there is no 
property for the size or count inside a menu item list. Is there?

              I wish to deselect or check all items inside one menu list so if 
I check one item all the rest are unchecked.

              I no from other languages ther is usually a way to count all 
items with a built in property and there is none for WE menu 
properties/methods. At least what I see on the property list.

              I attempted the UBound and that either says the method/property 
does not exist or not set...

              Any thoughts would be appreciated for I am at the moent making a 
dictionary list of all items to resolve the issue.

                  Bruce



-- 
Aaron Smith 
Web Development * App Development * Product Support Specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.

Reply via email to