[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dialog and large selection lists
From: |
Thomas Dickey |
Subject: |
Re: Dialog and large selection lists |
Date: |
Fri, 14 Dec 2012 06:41:08 -0500 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Fri, Dec 14, 2012 at 03:30:18AM -0800, Peter Hansson wrote:
> Hi,
>
> I'm trying to use Dialog for some rather large selection lists (in the range
> 20-100 items).
> User must select one and one only of these items.
>
> For this purpose I'm using the menu widget.
>
>
> Some things I cannot get my head around:
>
> - How can I control the width of the tag within the box. It seems to me that
> if Dialog cannot fit the text (i.e. tag-text + item-text) it starts chopping
> the tag-text. This seems unnatural to me. Why not chop the item-text?? The
> tag text is the unique identifier of each line in the box, right?
I think you're referring to this (it chops both):
/* If the name+text is wider than the list is allowed, then truncate
* one or both of them. If the name is no wider than 1/4 of the list,
* leave it intact.
*/
use_width = (list_width - 6);
if (text_width >= 0
&& name_width >= 0
&& use_width > 0
&& text_width + name_width > use_width) {
int need = (int) (0.25 * use_width);
if (name_width > need) {
int want = (int) (use_width * ((double) name_width) /
(text_width + name_width));
name_width = (want > need) ? want : need;
}
text_width = use_width - name_width;
}
> - Can I turn off the hotkey feature?? My selections have many, many choices
> that all start with the same letter, so the hotkey feature will be confusing
> to the user.
not currently (sounds like a feature request)
> - I need to add some kind of table heading. This is not a problem per se as
> I can use the menu text for that. But how do I align it with the contents of
> the menu box itself. I don't have control over the actual placement of the
> text inside the menu box and hence I cannot align the text a the top (the
> header) with what is inside.
again, a feature request ;-)
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature