Add-in ComboBox's Drop Down List With showCaption="true" Does Not Align To Box

2459
5
11-02-2010 08:27 AM
RyanCoodey
Occasional Contributor III
Please see the attached screen shot.  See how when showCaption="true" the drop down part of the ComboBox does not line up with the text box on the toolbar...  any ideas on how to fix this?

Also, another question about the Add-in's ComboBox... see how it only displays 4 items and there are a lot more items to scroll through?  How can I increase the number of items shown?  I would like to show more like 8.

Thanks a lot for any help!!!

*EDIT* I answered my second question, just set rows="8"
0 Kudos
5 Replies
RyanKoehnen
New Contributor III
I'm having the same alignment problem. Any solutions on this yet?
0 Kudos
RyanCoodey
Occasional Contributor III
Well, I ended up contacting support about this and got this response:


I investigated further and found that a product defect had already been logged for this issue.

#NIM065082- Add-in ComboBox dropdown is not under the ComboBox, it appears under the caption.

The current status of the Bug is 'Rejected'- Reason for Rejection is "as designed"
Unfortunately, this is by design and part of the add-in framework.

The workaround would be to keep the showCaption="false".


This makes absolutely no sense though.  I don't think I have ever seen a ComboBox that was "designed" this way... even ESRI's own ComboBox's don't behave this way (ex. Spatial Analyst Toolbar).  I sent an enhancement request back asking for an option to adjust this alignment then, but kind of doubt this will happen. 

Sorry, don't mean to rag on ESRI, they do exceptional development work... just don't understand their position on this one.
0 Kudos
RyanKoehnen
New Contributor III
Lame. If it "is as designed" then they designed a defective combobox. There's no point in showing the caption if it causes the dropdown UI to break convention with every other combobox ever invented (i.e. the dropdown descends directly from combobox).

The compromise I settled on was to show the caption and then make the dropdown wider than the combobox like so-

sizeString="WWWWWWWWWWWWWWWWW" itemSizeString="WWWWWWWWWWWWWWWWWWWWWW"
0 Kudos
JeffreyHamblin
New Contributor III
Ryan,

Thanks for posting the work around, which makes it look better under the circumstances. I agree the "designed" behavior is odd.
0 Kudos
DubravkoAntonic
New Contributor III
I don't have ArcGis 10 so I'm no able to verify this.

Maybe caption of the combo can be some other AddIn like Label or Button with flat style to simulate Label appearance.