"Object Inspector" 에 있는 Items => String list editor 에
clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray,
clSilver, clRed, clLime,clYellow, clBlue, clFuchsia, clAqua, clWhite
을 차례대로 입력해서...
void __fastcall TForm1::ComboBox1DrawItem(TWinControl *Control, int Index,
TRect &Rect, TOwnerDrawState State) {
int iColor;
ComboBox1->Canvas->FillRect(Rect);
IdentToColor(Items[Index], iColor);
ComboBox1->Canvas->Brush->Color=iColor;
ComboBox1->Canvas->Rectangle(Rect.Left+1,Rect.Top+1,Rect.Right-1,Rect.Top+15);
}
콤보박스에 색 띠를 출력하려고 컴파일하며는 Items[Index] 에 에러가
발생합니다. 어떻게 해야 Items 속에 있는 것을 콤보박스에 색 띠를
출력할 수 있는지 궁금합니다. - jsk365 -
|