As title,
By changing the Cursor in the Object Inspector can choose the style of the Cursor
In the process of writing
TChart * chtXYGraph;
ChtXYGraph - & gt; Cursor=crSizeWE;
Why don't you work?
Whether there is a need special setting?
Because the program is used in the same statement can directly change the style of the cursor on the form, but not on the chart, not understand
CodePudding user response:
TChart * chtXYGraph;
ChtXYGraph just a pointer variable, not an object, if the dynamic creation object, need new, if it is put on the form controls design period, run automatically create the control,
CodePudding user response:
reference 1st floor u010165006 response: TChart * chtXYGraph; ChtXYGraph just a pointer variable, not an object, if the dynamic creation object, need new, if it is put on the form controls design period, automatically create the control operation, See what you mean ~ I glued the meaning of this sentence is to show that chtXYGraph is the name of my tchart controls on the form, My question is like Form1 - & gt; Cursor=crSizeWE; You can change the cursor on the form style, but the same statement to use on the chart is not an error but the cursor does not change, CodePudding user response:
ChtXYGraph - & gt; Cursor=crSizeWE; This sentence is written in the form in the constructor? CodePudding user response:
reference u010165006 reply: 3/f chtXYGraph - & gt; Cursor=crSizeWE; This sentence is written in the form in the constructor? B: yes! CodePudding user response:
I tried, really run set when the cursor is invalid, can through the onm ouseEnter, onm ouseLeave event handling Settings: Void __fastcall TForm1: : Chart1MouseEnter (TObject * Sender) { Chart1 - & gt; The Tag=Screen - & gt; Cursor; Screen - & gt; Cursor=crSizeWE; } //-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Void __fastcall TForm1: : Chart1MouseLeave (TObject * Sender) { Screen - & gt; Cursor=Chart1 - & gt; The Tag; } CodePudding user response:
reference 5 floor DelphiGuy reply: I tried once, really run set when the cursor is invalid, can through the onm ouseEnter, onm ouseLeave event handling Settings: Void __fastcall TForm1: : Chart1MouseEnter (TObject * Sender) { Chart1 - & gt; The Tag=Screen - & gt; Cursor; Screen - & gt; Cursor=crSizeWE; } //-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Void __fastcall TForm1: : Chart1MouseLeave (TObject * Sender) { Screen - & gt; Cursor=Chart1 - & gt; The Tag; } BCB6 chart found no onm ouseEnter and onm ouseLeave these two events