Michael Schmitt wrote:
> 1. If you create a table with a column of fixed width and
>     then you declare one of the cells in this column as a
>     multicolumn cell, the tabular dialog behaves incorrectly:
>     The "H. Alignment" in the "cell" tab is always reset to
>     "left" when you press "close" and reopen the dialog.
>     I guess "pwidth" on line 200 in "FormTabular.C"
>     is wrong. Could you please have a look at it?

No, the code is correct IMHO.
I think it is not possible to set H. Alignment in a column with fixed 
width, multicolumn cell or not. That's why it is reset to "left" (Jug, 
please correct me if I'm wrong). What should be done to make this clear 
is disable H. Align in "Cell" if a fixed width is chosen in column. 
I've attached a patch.

> 2. While having a short look at the code, I noticed
>     that lines 206-208 and 240-242 seem to be contradictory.

Why?

> 3. In the tabular dialog ("Column/Row" and "cell" tabs)
>     different types of buttons are used for "H" and "V" alignment.
>     Shouldn't they look the same?

Of course :-) The patch changes this (if it is accepted as a "bugfix" 
at this point of time).

Juergen
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.258
diff -u -r1.258 ChangeLog
--- src/frontends/xforms/ChangeLog	2002/01/21 10:47:19	1.258
+++ src/frontends/xforms/ChangeLog	2002/01/24 20:02:09
@@ -1,3 +1,10 @@
+2002-01-24  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
+
+	* FormTabular.C (update): Disable "H. Align" in a multicolumn cell
+	if the column has fixed width (it is always set to "left" anyway).
+
+	* forms/form_tabular.fd: checkbox2radiobutton changes.
+
 2002-01-20  Herbert Voss  <[EMAIL PROTECTED]>

 	* FormInclude.[C]: better control of unexistings files
Index: src/frontends/xforms/FormTabular.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/FormTabular.C,v
retrieving revision 1.34
diff -u -r1.34 FormTabular.C
--- src/frontends/xforms/FormTabular.C	2002/01/16 16:34:03	1.34
+++ src/frontends/xforms/FormTabular.C	2002/01/24 20:02:10
@@ -237,9 +237,12 @@
 		setEnabled(cell_options_->radio_valign_bottom, !pwidth.zero());
 		setEnabled(cell_options_->radio_valign_center, !pwidth.zero());

-		setEnabled(cell_options_->radio_align_left,   pwidth.zero());
-		setEnabled(cell_options_->radio_align_right,  pwidth.zero());
-		setEnabled(cell_options_->radio_align_center, pwidth.zero());
+		setEnabled(cell_options_->radio_align_left,   pwidth.zero()
+				&& tabular->GetColumnPWidth(cell).zero());
+		setEnabled(cell_options_->radio_align_right,  pwidth.zero()
+				&& tabular->GetColumnPWidth(cell).zero());
+		setEnabled(cell_options_->radio_align_center, pwidth.zero()
+				&& tabular->GetColumnPWidth(cell).zero());
 	} else {
 		fl_set_button(cell_options_->radio_multicolumn, 0);
 
Index: src/frontends/xforms/form_tabular.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/form_tabular.C,v
retrieving revision 1.24
diff -u -r1.24 form_tabular.C
--- src/frontends/xforms/form_tabular.C	2002/01/16 17:41:36	1.24
+++ src/frontends/xforms/form_tabular.C	2002/01/24 20:02:12
@@ -225,23 +225,26 @@
     fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Top|#p");
-    fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 330, 135, 155, 25, idex(_(dummy)));
+    fdui->radio_valign_top = obj = fl_add_round3dbutton(FL_PUSH_BUTTON, 330, 135, 155, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Center|#n");
-    fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 330, 160, 155, 25, idex(_(dummy)));
+    fdui->radio_valign_center = obj = fl_add_round3dbutton(FL_PUSH_BUTTON, 330, 160, 155, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Bottom|#o");
-    fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 330, 185, 155, 25, idex(_(dummy)));
+    fdui->radio_valign_bottom = obj = fl_add_round3dbutton(FL_PUSH_BUTTON, 330, 185, 155, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
@@ -360,23 +363,26 @@
     fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Top|#p");
-    fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 350, 135, 125, 25, idex(_(dummy)));
+    fdui->radio_valign_top = obj = fl_add_round3dbutton(FL_PUSH_BUTTON, 350, 135, 125, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Center|#n");
-    fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 350, 160, 125, 25, idex(_(dummy)));
+    fdui->radio_valign_center = obj = fl_add_round3dbutton(FL_PUSH_BUTTON, 350, 160, 125, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Bottom|#o");
-    fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 350, 185, 125, 25, idex(_(dummy)));
+    fdui->radio_valign_bottom = obj = fl_add_round3dbutton(FL_PUSH_BUTTON, 350, 185, 125, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
Index: src/frontends/xforms/forms/form_tabular.fd
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/forms/form_tabular.fd,v
retrieving revision 1.17
diff -u -r1.17 form_tabular.fd
--- src/frontends/xforms/forms/form_tabular.fd	2002/01/16 17:41:36	1.17
+++ src/frontends/xforms/forms/form_tabular.fd	2002/01/24 20:02:14
@@ -548,7 +548,7 @@
 argument: 0
 
 --------------------
-class: FL_CHECKBUTTON
+class: FL_ROUND3DBUTTON
 type: PUSH_BUTTON
 box: 330 135 155 25
 boxtype: FL_NO_BOX
@@ -566,7 +566,7 @@
 argument: 0
 
 --------------------
-class: FL_CHECKBUTTON
+class: FL_ROUND3DBUTTON
 type: PUSH_BUTTON
 box: 330 160 155 25
 boxtype: FL_NO_BOX
@@ -584,7 +584,7 @@
 argument: 0
 
 --------------------
-class: FL_CHECKBUTTON
+class: FL_ROUND3DBUTTON
 type: PUSH_BUTTON
 box: 330 185 155 25
 boxtype: FL_NO_BOX
@@ -896,7 +896,7 @@
 argument: 0
 
 --------------------
-class: FL_CHECKBUTTON
+class: FL_ROUND3DBUTTON
 type: PUSH_BUTTON
 box: 350 135 125 25
 boxtype: FL_NO_BOX
@@ -914,7 +914,7 @@
 argument: 0
 
 --------------------
-class: FL_CHECKBUTTON
+class: FL_ROUND3DBUTTON
 type: PUSH_BUTTON
 box: 350 160 125 25
 boxtype: FL_NO_BOX
@@ -932,7 +932,7 @@
 argument: 0
 
 --------------------
-class: FL_CHECKBUTTON
+class: FL_ROUND3DBUTTON
 type: PUSH_BUTTON
 box: 350 185 125 25
 boxtype: FL_NO_BOX

Reply via email to