TDXTREELIST how to implement automatic listing in the program

xiaoxiao2021-03-06  60

In fact, their own determination of the column width is not adjusted directly attribute procedure TForm1.dxTreeList1CustomDrawCell (Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: String ; var aColor: TColor; aFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); begin if AColumn.Width <(ACanvas.TextWidth (aText) 15) then AColumn.Width: = ACanvas.TextWidth (aText) 15;

End; 15 is redundant width, adjustment

转载请注明原文地址:https://www.9cbs.com/read-118273.html

New Post(0)