]> git.llucax.com Git - z.facultad/75.10/miklolife.git/commitdiff
* Agrego un dialogo de seleccion de fecha para mayor comodidad y menos validaciones.
authorRicardo Markiewicz <gazer.arg@gmail.com>
Wed, 15 Jun 2005 23:52:31 +0000 (23:52 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Wed, 15 Jun 2005 23:52:31 +0000 (23:52 +0000)
demo/glade/agregar_afiliado.glade
demo/glade/ingresar_solicitud.glade
demo/src/Vistas/CalendarDialog.cs [new file with mode: 0644]
demo/src/Vistas/IngresarSolicitud.cs

index f231a9819f203d8e64ed4a672c009f0fd16c3054..ac3c57cf866ef7db0a7c102336c9e69cd96fe9c4 100644 (file)
 
       <child>
        <widget class="GtkVBox" id="vbox3">
 
       <child>
        <widget class="GtkVBox" id="vbox3">
+         <property name="border_width">12</property>
          <property name="visible">True</property>
          <property name="homogeneous">False</property>
          <property name="spacing">0</property>
          <property name="visible">True</property>
          <property name="homogeneous">False</property>
          <property name="spacing">0</property>
                        </packing>
                      </child>
 
                        </packing>
                      </child>
 
-                     <child>
-                       <widget class="GtkEntry" id="fechaNac">
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="left_attach">1</property>
-                         <property name="right_attach">2</property>
-                         <property name="top_attach">5</property>
-                         <property name="bottom_attach">6</property>
-                         <property name="y_options"></property>
-                       </packing>
-                     </child>
-
                      <child>
                        <widget class="GtkHBox" id="hbox3">
                          <property name="visible">True</property>
                      <child>
                        <widget class="GtkHBox" id="hbox3">
                          <property name="visible">True</property>
@@ -633,6 +613,57 @@ CI</property>
                          <property name="y_options">fill</property>
                        </packing>
                      </child>
                          <property name="y_options">fill</property>
                        </packing>
                      </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox4">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">12</property>
+
+                         <child>
+                           <widget class="GtkEntry" id="fechaNac">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="editable">False</property>
+                             <property name="visibility">True</property>
+                             <property name="max_length">0</property>
+                             <property name="text" translatable="yes"></property>
+                             <property name="has_frame">True</property>
+                             <property name="invisible_char">*</property>
+                             <property name="activates_default">False</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="selectFechaNac">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="label" translatable="yes">_Seleccionar fecha</property>
+                             <property name="use_underline">True</property>
+                             <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">1</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">5</property>
+                         <property name="bottom_attach">6</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options">fill</property>
+                       </packing>
+                     </child>
                    </widget>
                  </child>
                </widget>
                    </widget>
                  </child>
                </widget>
index 7c2dede3943db17e9e69eb21c8e3c6f71f1b31d8..b596a94e8e253f8dee0fb75149b83f906f5339bb 100644 (file)
@@ -66,6 +66,7 @@
 
       <child>
        <widget class="GtkVBox" id="vbox3">
 
       <child>
        <widget class="GtkVBox" id="vbox3">
+         <property name="border_width">12</property>
          <property name="visible">True</property>
          <property name="homogeneous">False</property>
          <property name="spacing">0</property>
          <property name="visible">True</property>
          <property name="homogeneous">False</property>
          <property name="spacing">0</property>
                        </packing>
                      </child>
 
                        </packing>
                      </child>
 
-                     <child>
-                       <widget class="GtkEntry" id="fechaNac">
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="left_attach">1</property>
-                         <property name="right_attach">2</property>
-                         <property name="top_attach">5</property>
-                         <property name="bottom_attach">6</property>
-                         <property name="y_options"></property>
-                       </packing>
-                     </child>
-
                      <child>
                        <widget class="GtkHBox" id="hbox3">
                          <property name="visible">True</property>
                      <child>
                        <widget class="GtkHBox" id="hbox3">
                          <property name="visible">True</property>
@@ -430,6 +410,58 @@ CI</property>
                          <property name="y_options">fill</property>
                        </packing>
                      </child>
                          <property name="y_options">fill</property>
                        </packing>
                      </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox4">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">10</property>
+
+                         <child>
+                           <widget class="GtkEntry" id="fechaNac">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="editable">False</property>
+                             <property name="visibility">True</property>
+                             <property name="max_length">0</property>
+                             <property name="text" translatable="yes"></property>
+                             <property name="has_frame">True</property>
+                             <property name="invisible_char">*</property>
+                             <property name="activates_default">False</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="seleccionarFecha">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="label" translatable="yes">_Seleccionar Fecha</property>
+                             <property name="use_underline">True</property>
+                             <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
+                             <signal name="clicked" handler="OnSeleccionarFechaClicked" last_modification_time="Wed, 15 Jun 2005 23:29:45 GMT"/>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">1</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">5</property>
+                         <property name="bottom_attach">6</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options">fill</property>
+                       </packing>
+                     </child>
                    </widget>
                  </child>
                </widget>
                    </widget>
                  </child>
                </widget>
@@ -853,8 +885,8 @@ Neuquen</property>
                      <property name="n_rows">6</property>
                      <property name="n_columns">2</property>
                      <property name="homogeneous">False</property>
                      <property name="n_rows">6</property>
                      <property name="n_columns">2</property>
                      <property name="homogeneous">False</property>
-                     <property name="row_spacing">0</property>
-                     <property name="column_spacing">0</property>
+                     <property name="row_spacing">8</property>
+                     <property name="column_spacing">8</property>
 
                      <child>
                        <widget class="GtkLabel" id="label24">
 
                      <child>
                        <widget class="GtkLabel" id="label24">
diff --git a/demo/src/Vistas/CalendarDialog.cs b/demo/src/Vistas/CalendarDialog.cs
new file mode 100644 (file)
index 0000000..958abca
--- /dev/null
@@ -0,0 +1,25 @@
+
+
+using Gtk;
+using System;
+
+public class CalendarDialog : Dialog
+{
+       private Calendar calendar;
+
+       public DateTime Date {
+               get { return calendar.GetDate (); }
+       }
+
+       public CalendarDialog ():base ("Seleccionar Fecha", null, DialogFlags.DestroyWithParent)
+       {
+               calendar = new Calendar ();
+               VBox.PackStart (calendar);
+               calendar.Show ();
+
+               /* Botones */
+               AddButton ("_Close", ResponseType.Close);
+               AddButton ("_Aceptar", ResponseType.Accept);
+       }
+}
+
index 384e646da13d598df7dc008d29dda47ece1c582e..1079641a8b3d85f09ecb271b8f9f6267a5af7f02 100644 (file)
@@ -101,6 +101,16 @@ public class VIngresarSolicitud
                c.Dispose ();
        }
 
                c.Dispose ();
        }
 
+       public void OnSeleccionarFechaClicked (object o, EventArgs args)
+       {
+               CalendarDialog d = new CalendarDialog ();
+               int response;
+               response = d.Run();
+               if (response == -3)
+                       fechaNac.Text = d.Date.ToLongDateString ();
+               d.Destroy ();
+       }
+
        public void Run ()
        {
                Dialog w = (Dialog)xml.GetWidget ("ingresarSolicitud");
        public void Run ()
        {
                Dialog w = (Dialog)xml.GetWidget ("ingresarSolicitud");