Update: Ugh... how embarrasing. Ok, here's the story -- I'll try and keep it short.

JComboBox has two callbacks for adjusting the Popup Listbox: -popupcreate and -popupmodify. Originally, these options were used to configure the Listbox at two different points prior to displaying the Popup.

JCombobox has a large section of code that tweaks width, height and other positioning information depending on values of various options. One of these two callbacks was used to modify the JComboBox before this block of code was executed (-popupcreate), and one after the block had been executed (-popupmodify). The first would allow someone to make changes such as to the options contained within the JComboBox, but still take advantage of the positioning code and other misc logic, and the second option would give someone the final word on the configuration/layout of the popup prior to displaying it, allowing the developer to override any options I saw fit to set.

It looks like at some point, I must have decided that option number 2 was insufficient, and instead of modifying what I'd set, I decided to offer someone the opportunity to completely control the positioning and replace my logic with theirs. I put this weighty responsibility into the popupcreate option, which explains why the popup didn't look good and was positioned incorrectly. You must not have provided positioning logic.

When I changed this, I think I went too far, and provided too much flexibility. In retrospect, this was a pretty bad idea -- I think it's highly unlikely that someone would want to go through all this trouble... If so, they would likely be rolling their own ComboBox implementation.

I think I'm going to change it back to the way it was, provide an explanation, and options for those who have implemented that option. I should have a new release tomorrow sometime... For now, see if -popupmodify will work for the short term (or put a call to PopupCreate within your -popupcreate sub). If you'd prefer, I'll probably have a fix in by tomorrow - I've had time to consider the scope of change and it shouldn't be a big deal, but I'd have to run it through tests, etc.

BTW: Did you come to any conclusions on how or if you're going to refactor your large Perl/Tk app?

Thanks,

Rob

In reply to Re: Problems with Tk::JComboBox by rcseege
in thread Problems with Tk::JComboBox by jdtoronto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.