> SELECT Mouse.Right
> CASE TRUE
> almenu.popup()
> CASE ELSE
> END SELECT
???
IF Mouse.Right THEN almenu.Popup()
Don't use SELECT for something that have only one answer ! It's ugly.
--
Come build with us!
O.K I found the answer in examples
' Gambas class file
PUBLIC save AS Action
PUBLIC SUB gV_Menu()
DIM almenu, almenu1 AS Menu
almenu = NEW Menu(FMain)
almenu1 = NEW Menu(almenu)
almenu1.Text = "Delete selected"
almenu.Hide
almenu.popup()
almenu1.Action = "save"
END
PUBLIC SUB Action_Activate(ke
Am Freitag, den 09.10.2009, 23:11 +0200 schrieb M. Cs.:
> Troubles: I've done this
>
> PUBLIC SUB gV_Menu()
> DIM almenu, almenu1 AS Menu
> almenu = NEW Menu(FMain)
> almenu1 = NEW Menu(almenu)
> almenu1.Text = "Delete selected"
> almenu.Hide
> IF gV.Rows.Count > 0 AND gv.Column = 1 THEN
> SELECT
O.K That works. Now, through almenu1.Action=My_Subroutine() should work?
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
devel
> Troubles: I've done this
>
> PUBLIC SUB gV_Menu()
> DIM almenu, almenu1 AS Menu
> almenu = NEW Menu(FMain)
> almenu1 = NEW Menu(almenu)
> almenu1.Text = "Delete selected"
> almenu.Hide
> IF gV.Rows.Count > 0 AND gv.Column = 1 THEN
> SELECT Mouse.Right
> CASE TRUE
> almenu.popup()
> CASE ELSE
> E
Troubles: I've done this
PUBLIC SUB gV_Menu()
DIM almenu, almenu1 AS Menu
almenu = NEW Menu(FMain)
almenu1 = NEW Menu(almenu)
almenu1.Text = "Delete selected"
almenu.Hide
IF gV.Rows.Count > 0 AND gv.Column = 1 THEN
SELECT Mouse.Right
CASE TRUE
almenu.popup()
CASE ELSE
END SELECT
ENDIF
END
And the
> M Cs,
>
> try this:
> create a Menu with name mnuGrid and make it hidden
> then add this to the gridview's mousedown event
>
> PUBLIC SUB gridview1_MouseDown()
>
> IF gridview1.Rows.Count > 0 AND gvBackup.Column = 1
> SELECT Mouse.Right
> CASE TRUE
> mnuGrid.popup()
> CASE ELSE
>
1st you would need to create a hidden menu using the menu editor
Then you would use the 'menu' event of the control (right click the
control select 'event' then menu) to popup the menu.
mnuname.popup() 'where mnuname is the menu item name.
For when it gets activated you would have to do
oops... sorry gvbackup should be gridview1
Regards
Dimitris
On Fri, Oct 9, 2009 at 1:03 AM, Dimitris Anogiatis wrote:
> M Cs,
>
> try this:
> create a Menu with name mnuGrid and make it hidden
> then add this to the gridview's mousedown event
>
> PUBLIC SUB gridview1_MouseDown()
>
> IF gridvi
M Cs,
try this:
create a Menu with name mnuGrid and make it hidden
then add this to the gridview's mousedown event
PUBLIC SUB gridview1_MouseDown()
IF gridview1.Rows.Count > 0 AND gvBackup.Column = 1
SELECT Mouse.Right
CASE TRUE
mnuGrid.popup()
CASE ELSE
END SELECT
ENDIF
END
T
Is it possible to assign a pop-up menu to an object?
I mean I have a gridview and I would like to have a right-click menu with
few options like select all, delete selected etc.
It would be activated when the mouse's pointer is above the gridview and the
right mouse button would be clicked. A simila
11 matches
Mail list logo