Pop up menu,when mouse clock with in a textview
- From: Sreejith S <srssreejith gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Pop up menu,when mouse clock with in a textview
- Date: Sat, 22 Aug 2009 07:16:03 +0530
Hi...
I have a textview placed in my gtk window. I need to create a popup
menu when i press the right mouse button with in the text
view.Actually i tryed something,but not a complete solution.I created
"$menu_edit"--menu...textview refereneces are right..
Actually i dont know in which signal this code apends..Now im trying
with textview--button-press-event....Iam getting the right button key
as 3.One problem is textview already has a default popup,which
contains cut,copy..etc...
when i pressed right button with in the textview the default popup
appreas first..then a small rectangle displayed...but no menu
items....
Regards...
Sreejith
My code....
$source_text->signal_connect('button-press-event' => sub{
my ($widget,$event)= _;
&test_button_release($widget,$event);
});
sub test_button_release
{
my ($widget,$event)= @_;
my $button_nr = $event->button();
($button_nr == 3) &&( $menu_edit->popup(undef,undef,undef,undef,0,0));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]