Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Painting background color for Combo box(How to paint the background color for the combo box arrow?)
Painting background color for Combo box [message #917105] Wed, 19 September 2012 20:29 Go to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Hi,

I have the following CSS code:

Combo,
Combo[BORDER] {
    color: #4a4a4a;
    background-color: #ecf1f7;
    border: 1px solid #aaaaaa;
    border-radius: 0px;
    padding: 2px 5px;
    background-image: none;
    text-shadow: none;
    box-shadow: none;
}

Combo.searchBox {
    background-image: gradient(linear, left top, right top,
              from( rgb(230, 230, 230) ),
              to( rgb(180, 180, 180) )
          );
    border: 1px rgb(200, 200, 200);
}

Combo-Button.searchBox {
    border-left: 0px;
    background-color: rgb(220, 220, 220);
}


which I have registered the "searchBox" style with my combo widget.

This is what I get: index.php/fa/11575/0/

As you can see, the gradient works beautifully, but the arrow area is still white in color. I can't seem to be able to style that part of the widget. What did I do wrong?

Thanks,
Ronald

  • Attachment: combobox.png
    (Size: 0.65KB, Downloaded 551 times)
Re: Painting background color for Combo box [message #917921 is a reply to message #917105] Thu, 20 September 2012 15:08 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi.

As far as i can tell the result matches your CSS.

> Combo-Button.searchBox {
> border-left: 0px;
> background-color: rgb(220, 220, 220);
> }

If you don't want white, set "transparent" as background-color, or set a
gradient as background-image.

Greetings,
Tim

Am 19.09.2012 22:29, schrieb Ronald So:
> Hi,
>
> I have the following CSS code:
>
>
> Combo,
> Combo[BORDER] {
> color: #4a4a4a;
> background-color: #ecf1f7;
> border: 1px solid #aaaaaa;
> border-radius: 0px;
> padding: 2px 5px;
> background-image: none;
> text-shadow: none;
> box-shadow: none;
> }
>
> Combo.searchBox {
> background-image: gradient(linear, left top, right top,
> from( rgb(230, 230, 230) ),
> to( rgb(180, 180, 180) )
> );
> border: 1px rgb(200, 200, 200);
> }
>
> Combo-Button.searchBox {
> border-left: 0px;
> background-color: rgb(220, 220, 220);
> }
>
>
> which I have registered the "searchBox" style with my combo widget.
>
> This is what I get:
>
> As you can see, the gradient works beautifully, but the arrow area is still white in color. I can't seem to be able to style that part of the widget. What did I do wrong?
>
> Thanks,
> Ronald
>
>

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Painting background color for Combo box [message #921202 is a reply to message #917921] Sun, 23 September 2012 23:32 Go to previous messageGo to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Thanks Tim.

This works:
Combo-Button {
  border-left: 0px;
  background-color: rgb(220, 220, 220);
}


But this does not work:

Combo-Button.searchBox {
  border-left: 0px;
  background-color: rgb(220, 220, 220);
}


I have used the "dot" format to create styles for a particular widget in other places. Why did Combo-Button not working in the same way?

Thanks,
Ronald
Re: Painting background color for Combo box [message #921568 is a reply to message #921202] Mon, 24 September 2012 08:23 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi.

> I have used the "dot" format to create styles for a particular widget in
> other places. Why did Combo-Button not working in the same way?

Apparently there is a bug in the combo button. Please open a bug report
on bugzilla. What RAP verion are you using?

Greetings,
Tim




--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Painting background color for Combo box [message #921928 is a reply to message #921568] Mon, 24 September 2012 15:02 Go to previous message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Tim,

I am using RAP 1.5 RC3, waiting to upgrade to 1.5.1 this week.

I have logged a bug. https://bugs.eclipse.org/bugs/show_bug.cgi?id=390215

Thanks,
Ronald
Previous Topic:Session Recovery
Next Topic:Browser Widget focus problem
Goto Forum:
  


Current Time: Thu Apr 25 09:52:59 GMT 2024

Powered by FUDForum. Page generated in 0.03569 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top