This is a migrated thread and some comments may be shown as answers.

Modifying the ComboBox Background Images

4 Answers 94 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Michael O'Flaherty
Top achievements
Rank 2
Michael O'Flaherty asked on 03 Apr 2012, 09:52 PM
Hi!

I am able to modify the background image of the combobox using this css (images attached). However, we loose the hover and focus image (see results.png for the focus problem.)
 
How do I change the images for the various states? Thanks!

Michael
.radComboBox td.rcbInputCell
{
    background-image: url('/Images/ComboBoxSprite.png') !important;
}
.radComboBox table td.rcbArrowCell
{
    background: #ffffff url('/Images/ComboBoxDropDown.png') no-repeat -1px 50%;
}

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 04 Apr 2012, 05:19 AM
Hi,

Try overriding the default css using "!important" as follows.

CSS:
<style type="text/css">
 .RadComboBox_Default .rcbInputCell
  {
    background-image: url("../Images/ComboBoxSprite.png") !important;
  }
 .RadComboBox_Default .rcbArrowCell
  {
    background: #ffffff url("../Images/ComboBoxDropDown.png") no-repeat -1px 50% !important;
  }
</style>

Hope this helps.

Thanks,
Princy.
0
Michael O'Flaherty
Top achievements
Rank 2
answered on 04 Apr 2012, 02:25 PM

That oversight does solve the flashing. Is it possible to override the images when the control gets focus, and if so, how? I have tried 'rcbFocused' as well as ':focus' and I can't seem to find the combination. Thanks!

 

 

 

 

0
Accepted
Princy
Top achievements
Rank 1
answered on 05 Apr 2012, 05:15 AM
Hi,

Try the following CSS to override the InputCell and ArrowCell images when the RadComboBox gets focus.

CSS:
<style type="text/css">
  .RadComboBox_Default .rcbFocused  .rcbInputCell
    {
      background-imageurl("../Images/bullet5.jpg") !important;
    }
  .RadComboBox_Default .rcbFocused  .rcbArrowCell
    {
      background-imageurl("../Images/Desert.jpg") !important;
    }
</style>

Regards,
Princy.
0
Michael O'Flaherty
Top achievements
Rank 2
answered on 05 Apr 2012, 02:54 PM
Worked like a charm -- thanks! I must not have had the right combination.
Tags
ComboBox
Asked by
Michael O'Flaherty
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 1
Michael O'Flaherty
Top achievements
Rank 2
Share this question
or