Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxBarCustomCombo.MeasureItemWidth(Integer,Integer) Method

Determines listbox item width in pixels.

#Declaration

Delphi
procedure MeasureItemWidth(AIndex: Integer; var AWidth: Integer); virtual;

#Parameters

Name Type
AIndex Integer
AWidth Integer

#Remarks

Use this method to determine the length of listbox items. AIndex specifies the index of the listbox item in the Items array. AWidth corresponds to the width of the listbox item. The MeasureItemWidth method defines the listbox item length in relation to used font. Descendants can override this method to access the proper width for their items. If a listbox item contains additional elements such as graphical lines or additional strings, the MeasureItemWidth should specify the width of the whole item, not just text width.

See Also