我又來了。 我只想發現如何使用TColorListBox更改矩形(Shape)的顏色背景。 我知道這很容易,但是我總是嘗試爲矩形設置一個新值,但我得到了異常。 我使用的命令如下:使用TColorListBox從矩形更改顏色
Rectangle1->Fill->Color = ColorListBox1->Color;
功能:
void __fastcall TForm1::ColorListBox1Click(const TCustomListBox *Sender,
const TListBoxItem *Item)
{
Rectangle1->Fill->Color = ColorListBox1->Color;
}
現在我越來越所有的時間錯誤我試圖改變科洛爾:
Access violation at address 00405628 in module 'Project1.exe'. Read of address 00000360.
調試器的另一個例外是:
First chance exception at $00405615. Exception class $C0000005 with message 'access violation at 0x00405615: read of address 0x00000360'. Process Ninterpres.exe (904)
有人可以幫我嗎?從現在開始,謝謝!
對不起,我已經通過了錯誤的名稱(他們與葡萄牙的名字,但均在兩種情況下是相同的)... 我會盡力解決方法我在docwiki發現從英巴卡迪諾: '\t如果(Ellipse1-> Fill-> Kind == TBrushKind :: Solid) \t \t Ellipse1-> Fill-> Color = ColorListBox1-> Color; \t else \t \t Ellipse1-> Fill-> Gradient-> Color = ColorListBox1-> Color;'' – mauroaraujo 2015-03-02 22:39:24