Skip Menu |

This queue is for tickets about the Prima CPAN distribution.

Report information
The Basics
Id: 61641
Status: resolved
Priority: 0/
Queue: Prima

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: ComboBox height when style cs::DropDown
Date: Sun, 26 Sep 2010 10:12:10 +1000
To: bug-Prima [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
In Prima 1.28 a ComboBox made with cs::DropDown() seems to have a height of several lines, where I thought it would be a single line. The effect can be seen in the "listbox" sample program by adding style => cs::DropDown()
Yes, true, this is the way ComboBox is implemented, - the height is defined differently for drop-down and the two other styles, which shows if the style is changed dynamically. I don't think that it is a bug, because explicit size of the whole widget must be respected; but I agree that the behavior is unexpected in the example.
Subject: Re: [rt.cpan.org #61641] ComboBox height when style cs::DropDown
Date: Thu, 30 Sep 2010 11:55:47 +1000
To: bug-Prima [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"KARASIK via RT" <bug-Prima@rt.cpan.org> writes: Show quoted text
> > the height is defined differently for drop-down and the two other > styles,
Is the cs::DropDown case meant to be more than one line high? Perhaps I don't understand how it's supposed to work. Show quoted text
> explicit size of the whole widget must be respected;
Yes. I got the effect I thought I wanted by making a dummy combo of the default style, getting its height, then forcing that height on the cs::DropDown ones :-) -- The sigfile one-line movie reviews series: "Cold Fever" -- easily the best Japanese-Icelandic road movie ever made.
Ah, you need the default height, not the height after changing styles - yes, I agree this can be seen as a kind of a bug. Because some other widgets (esp. InputLine) are smart about what their default height would be, but not the combo. I agree, it could've been done better, where the combo sets the default height if the style is drop-down. Then indeed, you need to specify the height explicitly. $window->font->height+4 is a good default value - not elegant, but fault-proof. It is actually the same formula used by InputLine when it sets its default height (see line 55 in InputLine.pm). I'm not sure if the problem is worth investigating and patching, but if you feel like trying, welcome!