Example Popup Menu help please

Ask about the individual Gambas components here.
User avatar
BruceSteers
Posts: 1691
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Example Popup Menu help please

Post by BruceSteers »

LiveFreeDead wrote: Monday 8th July 2024 12:45pm Yep I figured it out, was fairly easy :)

The trick was giving the root menu it's Text and making it not hidden and populate it with items, then it passes to POP_Click and did it's thing
but if it's not hidden then it always shows in the applications menubar so I don't think that was the trick, just a workaround.
(it's fine if you want it on the applications menubar)

Sub menus are done just by changing the parent when creating them.

Eg for your menus.
Select -
- All
- None
- Invert
Hide
- Portable
- Integrated
Load Preset
Save Preset


Dim hSubParent As Menu = New Menu($hPopup)  ' the Select menu parent
hSubParent.Text = "Select"

' add the next ones to hSubParent not $hPopup
Dim hSub As Menu = New Menu(hSubParent) As "POP"
hSub.Text = "All"
hSub.Name = "mnuSelectAll"
hSub.Shortcut = "Ctrl+A"

hSub = New Menu(hSubParent) As "POP"
hSub.Name = "mnuSelectNone"
hSub.Text = "None"

hSub = New Menu(hSubParent) As "POP"
hSub.Name = "mnuSelectToggle"
hSub.Text = "Invert"

hSubParent = New Menu($hPopup)  ' the Hide menu parent
hSubParent.Text = "Hide"

hSub = New Menu(hSubParent) As "POP"
hSub.Name = "mnuHideP"
hSub.Text = "Portable"

hSub = New Menu(hSubParent) As "POP"
hSub.Name = "mnuHideI"
hSub.Text = "Intergrated"

' the last 2 are children of the main $hPopup
hSub = New Menu($hPopup) As "POP"
hSub.Name = "mnuLoadP"
hSub.Text = "Load Preset"

hSub = New Menu($hPopup) As "POP"
hSub.Name = "mnuSaveP"
hSub.Text = "Save Preset"

If at first you don't succeed , try doing something differently.
BruceS
LiveFreeDead
Posts: 9
Joined: Monday 1st July 2024 2:05am

Re: Example Popup Menu help please

Post by LiveFreeDead »

I've tried to sign up to the bug tracker but my first attempt I never received the confirmation email, so this morning I tried again with my outlook address, I got the confirmation email, but when I click the link I got "Unable to activate account." I tried clicking it again with same results.

Please if you have contact with the site admin, could they enable my account manually, either LiveFreeDead or GlennChugg. I can use either as they both have correct credentials.

Thanks again for clarification on the menu systems of Gambas, I will finish off my project and see if I can help out around here in the forums, my methods are never as clean as yours, but if I can help when I do know something, I will :)
User avatar
gbWilly
Posts: 97
Joined: Friday 23rd September 2016 11:41am
Location: Netherlands
Contact:

Re: Example Popup Menu help please

Post by gbWilly »

LiveFreeDead wrote: Monday 8th July 2024 11:44pm I've tried to sign up to the bug tracker but my first attempt I never received the confirmation email, so this morning I tried again with my outlook address, I got the confirmation email, but when I click the link I got "Unable to activate account." I tried clicking it again with same results.

Please if you have contact with the site admin, could they enable my account manually, either LiveFreeDead or GlennChugg. I can use either as they both have correct credentials.
Have you tried logging in with your account at bugtracker?
If that doesn' t work subscibe to the user mailing list an report your problem there.
Then Benoit can take care of it
gbWilly
- Dutch translation for Gambas3
- Gambas wiki content contributer
- Gambas3 Debian repository


... there is always a Catch if things go wrong!
LiveFreeDead
Posts: 9
Joined: Monday 1st July 2024 2:05am

Re: Example Popup Menu help please

Post by LiveFreeDead »

Yeah the 2nd attempt did log in fine today, the activation link should log you in or at least not show that it's failed though. It takes a lot of time to gather all the information for a clear bug report, so I really didn't want to attempt to do it when I wasn't confident it would even work.
Post Reply