| GTK-EXTRA - Reference Manual

| Home

## Name

### GtkItemEntry - widget for gtk+

## Synopsis

    GtkType

    gtk_item_entry_get_type

    (void);

    GtkWidget*

    gtk_item_entry_new

    (void);

    GtkWidget*

    gtk_item_entry_new_with_max_length

    (guint16 max);

    void

    gtk_item_entry_construct_with_max_length

    (GtkItemEntry *item_entry,
    guint16 max);

    void

    gtk_item_entry_set_text

    (GtkItemEntry *item_entry,
    const gchar *text,
    GtkJustification justification);

    void

    gtk_item_entry_set_justification

    (GtkItemEntry *item_entry,
    GtkJustification justification);

## Object Hierarchy

         GtkObject
             +----GtkWidget
                  +----GtkEditable
                       +----GtkEntry
                            +-----GtkItemEntry

##
Args

## Signal Prototypes

    No signals

## Description

####
It is a GtkEntry subclass. It can have fixed size or can be dinamically resized when the text is entered.
You can change text justification to centered, left, or right, and change the foreground and background colors very easily.
It only displays the text and has no borders.

##
Details

    struct _GtkItemEntry
             {
             GtkEntry parent;
             gint text_max_size;
             GdkGC *fg_gc;
             GdkGC *bg_gc;
             GtkJustification justification;
             };

## Screenshot

### gtk_item_entry_get_type ()

    GtkType gtk_item_entry_get_type (void);

Returns |

##

### gtk_item_entry_new ()

    GtkWidget* gtk_item_entry_new (void);

Create a new item entry widget

Returns | the item entry widget

### gtk_item_entry_new_with_max_length ()

    GtkWidget* gtk_item_entry_new_with_max_length (guint16 max);

Create a new item entry widget with a limited length

max | number of chars in the entry
Returns | the item entry widget

### gtk_item_entry_construct_with_max_length ()

    void gtk_item_entry_construct_with_max_length (GtkItemEntry *item_entry,
                                                   guint16 max);

Initialize GtkitemEntry structure.

item_entry | the item_entry widget
max | number of chars in the entry

### gtk_item_entry_set_text ()

    void gtk_item_entry_set_text (GtkItemEntry *item_entry,
                                  const gchar *text,
                                  GtkJustification justification);

Sets the text in the item entry widget to the given value, replacing the current contents.

item_entry | the item_entry widget
text | the new text.
justification | the justification of text in entry GTK_JUSTIFY_LEFT, RIGHT, CENTER

### gtk_item_entry_set_justification ()

    void gtk_item_entry_set_justification (GtkItemEntry *item_entry,
                                           GtkJustification justification);

Sets the justification of the text in the item entry.

item_entry | the item_entry widget
justification | the justification of text in entry GTK_JUSTIFY_LEFT, RIGHT, CENTER

| Home |  |