[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Combobox with increased height has display problems at choose button  XML
Forum Index -> Development
Author Message
bebertz



Joined: 25/05/2016 15:26:49
Messages: 4
Offline

Hi,

we're facing some design issues with combobox in swing: When the height of the entries is increased by HTML/multiline values parts of the entries are repeated within the choose button of the combobox. This only happens if the popup is used inside a captain casa client, but not if we use it standalone, i.e. in standard swing.

Any ideas how to get rid of this stuff?

Any help appreciated.

Cheers,
Bernd
[Thumb - selectbox.png]
 Filename selectbox.png [Disk] Download
 Description On captain casa client letters are shown within the choose button while in pure swing same popup works fine
 Filesize 43 Kbytes
 Downloaded:  312 time(s)

CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5526
Offline

...hmm: we had a similar problem in the TEXTAREA-component (JTextArea), in this case the scroll area also showed content, that definitely belonged to some other part of the screen...

The "solution" there was, to do a repaint of the adequate component, in this case:

m_scrollPane.getViewport().repaint();

Of course calling the repaint-method does not sound like a perfect solution... but maybe it's the quickest!...

For the combo box

Regards, Björn

Björn Müller, CaptainCasa GmbH
bebertz



Joined: 25/05/2016 15:26:49
Messages: 4
Offline

Hi again,

unfortunately this topic somehow slipped through. However, we were unable to solve this the way you recommended as we create the popup like this:

JOptionPane.showInputDialog(null, description, title, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);

Thus we can't easily experiment with workarounds and we were not allowed to put significant effort in this display issue. But it looks not that nice so we'd highly appreciate a general solution for this Captain Casa specific issue. Until we get that we'll have to live with the situation.

Regards,
Bernd
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5526
Offline

@: "...Captain Casa specific issue..."

;-) - I am not too sure, where and why CaptainCasa should influence the rendering of a dialog that is opened in parallel. But I am quite sure about a similar issue that I had with Swing (the problem I mentioned in the comment before)... For me it's not really possible to support you here efficiently, because the popup is opened by your side.

Regards, Björn

Björn Müller, CaptainCasa GmbH
bebertz



Joined: 25/05/2016 15:26:49
Messages: 4
Offline

Hi again,

yes you're right, I wasn't very clear here. So let's code speak:


UIManager.setLookAndFeel(new CaptainCasaLookAndFeel());
String[] options = { "<html>SelectionOption1<br>Line2<br>line3</html>", "<html>SelectionOption1<br>Line2<br>line3</html>", "<html>SelectionOption1<br>Line2<br>line3</html>" };
JOptionPane.showInputDialog(null, "Please select", "Options", JOptionPane.QUESTION_MESSAGE, null, options, options[0]);

As soon as I try to select an entry it don't look that nice. But if I use Platform LookAndFeel everything's fine. Hopefully this helps to clarify why I call this Captain Casa specific.

Cheers,
Bernd
bebertz



Joined: 25/05/2016 15:26:49
Messages: 4
Offline

Hi again,

so now with Version 6_0_20160811 it works fine.

Thank you for fixing.

Best,
Bernd
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team