[yast-devel] how to span columns in a Table
dear list, I met this issue, I have a table with 2 columns and the code is this: Table(Id(:memberaddr1), Header("ip","nodeid"),[]), please look at the attached picture: the column width is too narrow, it leave a big space in the right of the table which I drew a red rectangle to show it. Is there any good ways to let the column automatically occupy the whole space of the table? Dongmao zhang
On Wed, 18 Dec 2013 20:42:28 +0800 Dongmao Zhang <dmzhang@suse.com> wrote:
dear list,
I met this issue, I have a table with 2 columns and the code is this:
Table(Id(:memberaddr1), Header("ip","nodeid"),[]),
please look at the attached picture: the column width is too narrow, it leave a big space in the right of the table which I drew a red rectangle to show it.
Is there any good ways to let the column automatically occupy the whole space of the table?
Dongmao zhang
Hi Dongmao, I am not libyui expert ( it is mvidner who probably answer tommorow ). But my quick wild guess is to enclose Table into HStretch element see examples here: https://github.com/yast/yast-ycp-ui-bindings/blob/0a6fa78d1702ec61f31a3348df... I hope it helps and if not, then please show result if something is changed and ideally point to your code as if I know yast2-cluster is opensource, so we can try it. Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Dne 18.12.2013 14:20, Josef Reidinger napsal(a):
Hi Dongmao, I am not libyui expert ( it is mvidner who probably answer tommorow ). But my quick wild guess is to enclose Table into HStretch element see examples here:
I think it does not work for a table, but I'm not sure, just give it a try ;-) -- Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
于 2013年12月18日 21:26, Ladislav Slezak 写道:
Dne 18.12.2013 14:20, Josef Reidinger napsal(a):
Hi Dongmao, I am not libyui expert ( it is mvidner who probably answer tommorow ). But my quick wild guess is to enclose Table into HStretch element see examples here:
I think it does not work for a table, but I'm not sure, just give it a try ;-)
Ok, I will try it, thanks
--
Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Thu, Dec 19, 2013 at 01:04:43PM +0800, Dongmao Zhang wrote:
于 2013年12月18日 21:26, Ladislav Slezak 写道:
Dne 18.12.2013 14:20, Josef Reidinger napsal(a):
But my quick wild guess is to enclose Table into HStretch element see examples here:
I think it does not work for a table, but I'm not sure, just give it a try ;-)
Ok, I will try it, thanks
No, that will not work. HStretch is a filler widget which does not take children. http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/bk08ch01.html#rubber_... (argh, no entry in http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/Book-UIReference.html ) There is a related hstretch *option*, http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/AAA_All-Widgets.html but it still does not do wnat you want. The Table widged simply does not give you any control over this. Note that the GTK UI does stretch the last column to fill the available table width, so what you reported is arguably a bug in the Qt UI. http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/Table.html -- Martin Vidner, Cloud & Systems Management Team http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
Dne 18.12.2013 13:42, Dongmao Zhang napsal(a):
Is there any good ways to let the column automatically occupy the whole space of the table?
AFAIK not, you could only do an ugly hack to add some spaces (" ") to the header title to force a wider column. But I'd avoid it, this is fragile and might not work well in different UIs (ncurses or Gtk). Yast UI abstraction is quite limited, you cannot do everything as in a full widget library. -- Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (4)
-
Dongmao Zhang
-
Josef Reidinger
-
Ladislav Slezak
-
Martin Vidner