Right justification of text in GtkEntry

2002-07-25 Thread Egon Andersen, Talura

Hi,

How do I make text (actually digits) right justified when the digits are
typed in the entry box?

I would like to se my numbers typed as:
[   123.45]
rather than
[123.45   ]

Best regards
Egon Andersen
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



glade-1.2 ->2.0

2002-07-30 Thread Egon Andersen, Talura

Hi,

I've made some UI's with glade-1.2 and has now upgraded to glade-2.0,
but I can't import my old projects. Are there any 'upgrade' facilities
available, so that I don't have to start again from scratch?

Best regards
Egon Andersen
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Text always selected in entry

2002-07-31 Thread Egon Andersen, Talura

Hi,

GTK2:
It seems that the default text in an entry is always selected when
entering the field. How do I prevent that from happening. I've tried
gtk_editable_select_region with start and end set to 0, but this does
not help.
Do someone have an idea about how I get past this problem?

/Egon
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



How do I remove a widget from a table?

2002-08-12 Thread Egon Andersen, Talura

Hi,

I would like to remove one or more widgets from a table.
The widget has been attached earlier by gtk_table_attach().
When I try to destroy the widget I get a segmentation fault (which I to
some degree can understand), but how do I remove the widget the 'right
way' ?

Best regards
Egon Andersen
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



problem with check_button in notebook tab

2002-08-26 Thread Egon Andersen, Talura

Hi,

[gtk2+]
I've inserted a check_button in some notebook tabs, which works fine in
my linux environment, but when I ported the code to windows, the
check_button could not be set/unset and the connected tooltips didn't
appear either.
I don't have problems with check_buttons or tooltips in other places
than in the notebook tab.
Do someone know why there is this strange difference between the linux
and windows versions?
And do anyone have an idea about how I can get the functionality in
windows.

Best regards
Egon Andersen
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Transparent background in window?

2002-09-04 Thread Egon Andersen, Talura

Hi,

Is it possible to make the background in a window transparent?
The reason that I ask is that I have made a splash screen with an image 
that is not rectangular (transparent background) and I would like the 
window to appear as having the same shape as the image.
I've been looking at gtk_style family, but I haven't found the solution.

Any hints?

Best regards
Egon Andersen

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: win32/gcc : how to avoid need of -fnative-struct

2002-09-08 Thread Egon Andersen, Talura

Thierry CARRARD wrote:
> when compiling a win32 app using gcc and win32 gtk DLLs,
> 
> you can suppress the ?fnative-struct option (which isn?t available any 
> more on gcc3.x)
> 
> if you replace the contant of gtk/gtkbox.h by this (for version 2.0.6) :
> 

Or use -mms-bitfields

/Egon

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



How do I expose a specific widget and all it parents?

2002-09-12 Thread Egon Andersen, Talura

Hi,

I don't know if the correct word is 'expose' or something else, but I'll 
try to explain my problem.

I have a notebook with several pages and I want to be able to from the 
application to show/expose any specific page I want.

I have notebooks that are nested and I imagine this may complicate things.

I also have scrollable windows and want a specific entry to be visible - 
just another complication I imagine.

Do anyone have hints or ideas?


Traditionally the user just click on the notebook tab and gets the 
selected page and scroll until the specific entry is visible, but I want 
to be able to select the page from the application and make the entry 
visible.

(The reason is that a post validation of entry data has shown that the 
entry data is invalid and the user has to correct it.)

Best regards
Egon Andersen


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: How do I expose a specific widget and all it parents?

2002-09-12 Thread Egon Andersen, Talura

Cupitt, John wrote:
> Egon Andersen, Talura wrote:
>  > I have a notebook with several pages and I want to be able to from the
>  > application to show/expose any specific page I want.
> 
> I think you need gtk_notebook_set_page()

I thought of this function, but then I need to make it top-down. I can 
in no way just say that I want to see the page (and its parents) 
containing a specific widget?
I can probably use the gtk_widget_get_parent/gtk_widget_get_ancestor to 
find the parent notebook(s), so I try that even though it seems a little 
clumsy.

BTW When I used gtk_widget_get_ancestor(notebook1, GTK_TYPE_NOTEBOOK), I 
got the pointer equal to 'notebook1', not the parent notebook as I had 
expected. Is this the intended behaviour of gtk_widget_get_ancestor() or 
is it a simple bug? (It is easy to work around in a consistent way, so 
it is no big deal.)

> 
>  > I also have scrollable windows and want a specific entry to be visible -
>  > just another complication I imagine.
> 
> It depends on what sort of thing you're displaying. Widgets like clist, 
> for example, have methods which will scroll to make a specific row visible.
> 
> If it's not a clever widget, then you just set the adjustment on the 
> scrolled window to the position of the child.

It is 'any widget', so it can not be expected to be a clever widget :-)
But how do I get the position of the widget, so that I can set the 
adjustment?

Basicly what I have access to is the widget pointer. So I have to 
determine the position of the widget relative to the scrolled window 
somehow...??

Best regards
Egon Andersen

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: How do I expose a specific widget and all it parents?

2002-09-12 Thread Egon Andersen, Talura

Cupitt, John wrote:
> Egon Andersen, Talura wrote:
> 
>>> > I have a notebook with several pages and I want to be able to from the
>>> > application to show/expose any specific page I want.
>>>
>>>I think you need gtk_notebook_set_page()
>>
>>I thought of this function, but then I need to make it top-down. I can 
>>in no way just say that I want to see the page (and its parents) 
>>containing a specific widget?
> 
> 
> Hiya,
> 
> Sure, just it depends on what info you're tracking. For example, if you 
> know the widget that each notebook page is showing, you can do
> 
>   gint page = gtk_notebook_page_num( nb, my_page_widget );
> 
>   gtk_notebook_set_page( nb, page );
> 
> (or have I misunderstood?)

Basicly I just know the widget pointer, so it requires some processing 
to find the correct parent notebooks and setting the page... but that 
part is close to working. The code you show is just a small but 
important part of this :-)

> 
> 
> To get one out, do
> 
>   gtk_widget_get_ancestor( widget->parent, GTK_TYPE_WHATEVER )
> 

Approximately how I did it.

> 
>>> > I also have scrollable windows and want a specific entry to be 
>>>visible -
>>> > just another complication I imagine.
>>>
>>>It depends on what sort of thing you're displaying. Widgets like 
>>>clist, for example, have methods which will scroll to make a specific 
>>>row visible.
>>>
>>>If it's not a clever widget, then you just set the adjustment on the 
>>>scrolled window to the position of the child.
>>
>>It is 'any widget', so it can not be expected to be a clever widget :-)
>>But how do I get the position of the widget, so that I can set the 
>>adjustment?
> 
> 
> What are you using inside the scrolled window to layout your widgets? 
> You might be able to just read child->allocation.x/y, or you might need 
> to poke about inside the layout widget.
> 

Mostly a mix of vboxes and hboxes added some frames and sometimes tables.
So it seems to be quite a job and still I'm totally confused about how 
to get the adjustment of anything at all.
E.g. how do I get the adjustment of an entry inside a vbox?

Best regards
Egon Andersen

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



gtk_text_view / gtk_text_buffer

2002-11-30 Thread Egon Andersen, Talura
Hi,

(Using GTK2+)

I'm trying to insert a (fixed) multi-line text into a gtk_text_view 
using gtk_text_buffer_insert()

My problem is that only the first line is displayed.
When I click in the gtk_text_view field the field expands and I can see 
all my inserted text lines.

How can I force all lines to be displayed in my gtk_text_view field?
(I.e. without having to click in the window of cause :-)

Best regards
Egon Andersen

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Setting fixed-width font

2003-09-26 Thread Egon Andersen, Talura
Hi,

I have a widget (actually a GtkLabel, but it may be changed later) for 
which I want use fixed-width font.

Is there a simple way to achieve this?

(I've looked in the FAQ and mail-archive. But it only described a 
solution using a resource file, which I don't want to use in this case.)

Best regards
Egon Andersen
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list