From 78e423001878fe33fd5a452e6cd51e3a040b10ea Mon Sep 17 00:00:00 2001 From: klm Date: Sun, 8 Mar 1998 17:24:16 +0000 Subject: RadioButtonArray.Format(): Somewhat cosmetic change, use cellspacing=5 to get the whitespace between entries, instead of the (ugly, in some cases)   kludge i implemented before. Ideally we would group each name/button pair together in an individual table cell, but i haven't scoped out the html format mechanism well enough to do that, yet. (John, are you listening?) --- modules/htmlformat.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'modules/htmlformat.py') diff --git a/modules/htmlformat.py b/modules/htmlformat.py index e7b5051da..2a8b0d175 100644 --- a/modules/htmlformat.py +++ b/modules/htmlformat.py @@ -383,20 +383,15 @@ class RadioButtonArray: self.horizontal = horizontal def Format(self, indent=0): - t = Table() + t = Table(cellspacing=5) items = [] l = len(self.button_names) for i in range(l): - if i == l: - pref = "" - elif i == 0: - pref = " " - else: pref = "    " if self.checked == i: - items.append(pref + self.button_names[i]) + items.append(self.button_names[i]) items.append(RadioButton(self.name, i, 1)) else: - items.append(pref + self.button_names[i]) + items.append(self.button_names[i]) items.append(RadioButton(self.name, i)) if self.horizontal: t.AddRow(items) @@ -411,7 +406,8 @@ class UnorderedList(Container): output = '\n%s\n' % spaces return output -- cgit v1.2.3-70-g09d2