Hi all,
is it possible to add submenu in menu of bevelbutton ?
How do it with addrow method ?
Thanks for your help
Hi all,
is it possible to add submenu in menu of bevelbutton ?
How do it with addrow method ?
Thanks for your help
Solution :
[code]Function MouseDown(X As Integer, Y As Integer) As Boolean
Dim AnneeMenu as New MenuItem
Dim subannee As New MenuItem(“2016”)
subannee.Append(New MenuItem(“Janvier 2016”))
subannee.Append(New MenuItem(“Fvrier 2016”))
subannee.Append(New MenuItem(“Mars 2016”))
subannee.Append(New MenuItem(“Avril 2016”))
subannee.Append(New MenuItem(“Mai 2016”))
subannee.Append(New MenuItem(“Juin 2016”))
subannee.Append(New MenuItem(“Juillet 2016”))
subannee.Append(New MenuItem(“Aot 2016”))
subannee.Append(New MenuItem(“Septembre 2016”))
subannee.Append(New MenuItem(“Octobre 2016”))
subannee.Append(New MenuItem(“Novembre 2016”))
subannee.Append(New MenuItem(“Dcembre 2016”))
AnneeMenu.Append subannee
dim menuchoice as MenuItem = AnneeMenu.PopUp(me.Left+10,me.top+me.height+70)
if menuchoice<>nil then
me.caption=menuchoice.Text
end if
Return true
End Function
[/code]
[quote=297078:@JrmeLeray]Solution :
[code]Function MouseDown(X As Integer, Y As Integer) As Boolean
Dim AnneeMenu as New MenuItem
Dim subannee As New MenuItem(“2016”)
subannee.Append(New MenuItem(“Janvier 2016”))
subannee.Append(New MenuItem(“Fvrier 2016”))
subannee.Append(New MenuItem(“Mars 2016”))
subannee.Append(New MenuItem(“Avril 2016”))
subannee.Append(New MenuItem(“Mai 2016”))
subannee.Append(New MenuItem(“Juin 2016”))
subannee.Append(New MenuItem(“Juillet 2016”))
subannee.Append(New MenuItem(“Aot 2016”))
subannee.Append(New MenuItem(“Septembre 2016”))
subannee.Append(New MenuItem(“Octobre 2016”))
subannee.Append(New MenuItem(“Novembre 2016”))
subannee.Append(New MenuItem(“Dcembre 2016”))
AnneeMenu.Append subannee
dim menuchoice as MenuItem = AnneeMenu.PopUp(me.Left+10,me.top+me.height+70)
if menuchoice<>nil then
me.caption=menuchoice.Text
end if
Return true
End Function
[/code][/quote]
Merveilleux!!! Merci beaucoup
If I move the window then the popup is created outside.
Is the correct approach add self.left and self.top to .PopUp(,)?