Re: The menu popup direction
- From: XiuHua Wu <xhwu grandstream com>
- To: Mike Massonnet <mmassonnet gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: The menu popup direction
- Date: Thu, 25 Sep 2008 13:58:54 +0800
It works. Thanks very much!
Mike Massonnet wrote:
Le Thu, 25 Sep 2008 09:00:21 +0800,
XiuHua Wu <xhwu grandstream com> a ècrit :
Yes, I know it can use this function to determine the position of the
menu. But if the menu is dynamic, I mean the length is not fixed and
can be changed during the program running, so the menu position must
be calculated every time. If the menu can be dropped from down to up,
and it only needs to determine the menu start position just like
dropped from up to down. So is there any method to make the menu
popup from up to down ?? Or I must do this by myself using the
GtkMenuPositionFunc function ??
You still do this in the position func. You must get the requisition
of your menu in this function with gtk_widget_size_request(), and to
get the bottom of menu at the cursor you would just have to substract
the req.height to y.
Hint:
GtkRequisition req;
gtk_widget_size_request (menu, &req);
*y -= req.height;
Mike
--
Sincerely,
Vanevan
xhwu grandstream com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]