GtkDateCombo

GtkDateCombo — Widget to display and alter a date.

Synopsis




GtkWidget*  gtk_date_combo_new              (void);
void        gtk_date_combo_set_date         (GtkDateCombo*,
                                             guint year,
                                             guint month,
                                             guint day);
void        gtk_date_combo_clear            (GtkDateCombo *dp);
void        gtk_date_combo_week_starts_monday
                                            (GtkDateCombo*,
                                             gboolean);
void        gtk_date_combo_ignore_year      (GtkDateCombo*,
                                             gboolean);

Description

The GtkDateCombo widget is used to display a formated date value. The display format used for the date depends on the locale setting. Additionally this widget provides a calendar popup for easy value changes. Direct editing of the date value in the display entry of the widget is supported too.

Details

gtk_date_combo_new ()

GtkWidget*  gtk_date_combo_new              (void);

Creates a new GtkDateCombo widget.

Returns :New Widget

gtk_date_combo_set_date ()

void        gtk_date_combo_set_date         (GtkDateCombo*,
                                             guint year,
                                             guint month,
                                             guint day);

Set the date of a GtkDateCombo widget. The date is defined with three separate values representating year, month and date.

Param1 :Widget
year :Year value to set
month :Month value
day :Day

gtk_date_combo_clear ()

void        gtk_date_combo_clear            (GtkDateCombo *dp);

Remove all settings/values from a date combo.

dp :Widget

gtk_date_combo_week_starts_monday ()

void        gtk_date_combo_week_starts_monday
                                            (GtkDateCombo*,
                                             gboolean);

This method changes the display behaviour of the calendar popup. It will display a week starting sunday if set to FALSE, if set to TRUE weeks will be displayed starting monday.

Param1 :Widget
Param2 :TRUE to have weeks starting monday, FALSE otherwise.

gtk_date_combo_ignore_year ()

void        gtk_date_combo_ignore_year      (GtkDateCombo*,
                                             gboolean);

If this function is enabled the widget will show and take dates without a year value. This is used for recurring events like holidays and birthdays. Default behaviour is to have dates including a year.

Param1 :Widget
Param2 :TRUE to enable, FALSE to disable