Re: [gtk-list] Question 1



Zio Budda wrote:
> How can I make a small button? I want to know if I can set the 
> 	dimensions of the button. Why I must to use the table to do 
> 	this?
You don't, you can use the widget functions, gtk_widget_set_usize works for me.

> How can I set the dimension of a progres bar? I have see that the
> 	MIN_WIDTH is = 200. I think that is much that the necessary.
> 	I think that  MIN_WIDTH = 50 is the best.
I susepct the function mentioned above will also do it.

> Why gtk_entry_insert_text do not work? when I use this function I 
> 	receiv a "gtk_entry_insert_text not found" from GCC. 
I cannot find that, perhaps gtk_entry_prepend_text is what you are after.

Looking in the include file, I find these functions:
guint      gtk_entry_get_type     (void);
GtkWidget* gtk_entry_new          (void);
void       gtk_entry_set_text     (GtkEntry      *entry,
                                   const gchar   *text);
void       gtk_entry_append_text  (GtkEntry      *entry,
                                   const gchar   *text);
void       gtk_entry_prepend_text (GtkEntry      *entry,
                                   const gchar   *text);
void       gtk_entry_set_position (GtkEntry      *entry,
                                   gint           position);
gchar*     gtk_entry_get_text     (GtkEntry      *entry);


> How can I change the entry set text after the entry is show?
I guess one of the above functions would do it.

> Is there a method to get/make a crypted/hidden entry? like if I want
> 	to get a passwrd? (Ok, i'm making a gtk-version of adduser).
I suspect what you would do is pick up the key press event and then
change the entry text somehow.

I have the following:
   gtk_signal_connect(GTK_OBJECT(bottext), "key_press_event",
                (GtkSignalFunc)entry_insert,NULL);

and

void entry_insert(GtkWidget *widget, GdkEventKey *key)
{
        char buf[2];
        if (key->keyval != XK_Return)
                return;

This last code fragment checks to see if the key pressed is "enter".

> Can I make a new Widget ? The WindowMessage Widget. How? Rules? Format?
I suspect that the gnome messagebox may be what you are after here.

The tutorial mentions a bit on how to make a widget, see section 20.

> Can I collegate a entry on a function with a signal? If Yes what type of
> 	signal can i use?
I don't understand the word "collegate".


Note that I am still a gtk beginner so some of this might be wrong, or not 
"the right way".  I'm just telling you how I did it.

 - Craig



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]