DateComboBox Button

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

DateComboBox Button

Postby ravipathak » Wed May 23, 2007 12:53 am

Hi,

Having an icon that resembles a Calendar for the button of DateComboBox would help a user easily differentiate between a normal combobox and a dropdown to select Dates.

Currently I'm creating my own Button and setting the icon but I was wondering if you think it should be done Jide itself.

Thanks.
ravipathak
 
Posts: 155
Joined: Thu Jul 06, 2006 5:44 am

Postby JIDE Support » Wed May 23, 2007 8:38 am

We actually want the drop down to be the same as JComboBox so that they look consistent. You can certainly do it yourself. That's why we leave createButtonComponent for you to override.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox Button

Postby bbadash » Wed Jan 07, 2009 11:11 am

When I change the button icon using
Code: Select all
    public AbstractButton createButtonComponent() {
        JButton dateButton = new JButton(IconsFactory.getImageIcon(DateComboBoxDemo.class, "calendar.gif"));
        dateButton.setMargin(new Insets(3, 3, 3, 3));
        return dateButton;
    }

the button is displayed nicely, but the popup only works correctly once. Clicking the mouse on the button the first time displays the DateChooserPanel and permits a selection. Clicking the mouse on the button thereafter flashes and immediately removes the DateChooserPanel. (I'm still able to display the panel using the down arrow on the text component.) This is with version 2.4.8.
bbadash
 
Posts: 16
Joined: Fri Jan 02, 2009 3:09 pm

Re: DateComboBox Button

Postby JIDE Support » Wed Jan 07, 2009 11:23 am

Just call
Code: Select all
                dateButton.setRequestFocusEnabled(false);
                dateButton.setFocusable(false);
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox Button

Postby bbadash » Wed Jan 07, 2009 11:52 am

Thanks. Works like a charm!
bbadash
 
Posts: 16
Joined: Fri Jan 02, 2009 3:09 pm


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 12 guests