Dynamic Margin in Combo
I would like to set the style of each line in the combo separately. I know that I can use something like:
to set the style for the whole object. Can this also be done for an individual line (or row)?
Have you tried?
where 'index' is the row in the combo listbox.
Perfect, Carlos, just what I needed. I knew there must be a way, I also knew I would never get there on my own.
This works if there are images, but on combo objects without images it does not indent. Is this an issue with the defined styles or am I missing something?
And as long as I am here, I might as well ask... I cannot find the definition of the background for the combo popup item. I would like to reduce it in size, but cannot locate the code in aw.css.
I think the text ("box/text" object) is preceded by the image, so you would also need to add a bigger indent to the Items without image, in the same way you do with image ("box/image"), but really never tried that.
hO! and for your other question, as Anthony said the combos' popup is a simple list object ( contained in a special floating frame/div), so you can get all list properties/methods from the above link.
If you are trying to redimension the whole drop-down combo's list container you must refer it by obj.getPopupTemplate() .
Search "getPopupTemplate()" in the forum and will get some samples.
Thank you. I did not even realize that I was using "box/image" instead of "box/text". Been looking at this code for too long! My dynamic indent is now working.
What I meant on the background of the combo's popup was the size of the image. I can see in aw.css that it is set as the background, but did not find the width (I realize the height will be set as defined by the font size used).
This topic is archived.
Back to support forum