I have to apologize first.
I didnt decribe my question clearly:
I want to make a panel such as gnome toolbar,
which can autohide or move to the left/right.
I planed to use a gtk_window, which can be set position using the function "gtk_widget_set_uposition".
But when I plan to move this toolbar to the left,
the x value must set to be minus value.
However, this is not allowed.
Thus, I need some advises.
And thx for Rafael's reply, I'm sorry that I didnt make it clear.
Rgds,
anton
2006/5/17, Rafael Teixeira <[EMAIL PROTECTED]>:
Hi,
From GTK+ documentation:
-----------------------------------
gtk_widget_set_uposition ()
Warning
gtk_widget_set_uposition is deprecated and should not be used in
newly-written code.
Sets the position of a widget. The funny "u" in the name comes from
the "user position" hint specified by the X Window System, and exists
for legacy reasons. This function doesn't work if a widget is inside a
container; it's only really useful on GtkWindow.
-----------------------------------
See that absolute sizing/positioning is really not a welcome thing in
GTK, that is all self-adjustable to either contents and containers.
If you really need to adjust the widget position at an odd negative
offset, you probably you'll have to adjust position in the container
side, not in the widget itself.
If you really need to adjust it in the widget the solution is to lie
about the size and draw the widget displaced. So you won't be able to
do that with the plain stock widgets, but only with custom ones, or
hopefully with subclassed ones.
Both alternatives may yield wrong results, as containers may 'crop'
the widget drawing to the container boundaries.
Hope it helps,
On 5/15/06, 安小東 <[EMAIL PROTECTED]> wrote:
> Dear All:
>
> I am wondering that
> how could I set a widget position to be a minus value ?
>
> thx for help.
>
> Rgds,
> anton
> --
> gtk_widget_set_uposition ()
>
> void gtk_widget_set_uposition (GtkWidget *widget,
> gint x,
> gint y);
>
> widget : a GtkWidget
> x : x position; -1 to unset x; -2 to leave x unchanged
> y : y position; -1 to unset y; -2 to leave y unchanged
--
Rafael "Monoman" Teixeira
---------------------------------------
As I'm currently working a lot with Java and even fixing Java VMs
(JamVM/Kaffe) and GNU Classpath code, I think I may partly borrow the
title (Javaman) from my friend Bruno Souza and become the
MonoNJavaMan. Yeah, I may currently be crazier than usual...
--
----------------------------------------
活在當下
_______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
