delphi TreeComboBox 解决树的单击事件和小三角单击事件冲突问题
for i := 0 to cbb_controlmattype.Items.Count -1 do
begin
if cbb_controlmattype.Items[i].Selected = True then
begin
if cbb_controlmattype.Items[i].Expanded = False then
cbb_controlmattype.Items[i].Expanded := True
else
cbb_controlmattype.Items[i].Expanded := False;
mattypename := cbb_controlmattype.Items[i].Text; //单击的时候临时赋值物料类别
cbb_controlmattype.Items[i].Selected := False; //避免小三角单击事件冲突
Break;
end;
end;