11
-- -- 22,
Click on the 11 a form, click on the 22 a form, in the void __fastcall TFormSyetem: : TreeView1Change (TObject * Sender, TTreeNode * Node) what is need to add the code in this function?
CodePudding user response:
This you need to give each child node set index, I did this, code sent to you see, if there is a better method, please people recommend
void __fastcall TFormSyetem: : caidanTreeChange (TObject * Sender,
TTreeNode * Node)
{
If (Node - & gt; SelectedIndex==1)//11 said node
{
From2 - & gt; Show ();
}
If (Node - & gt; SelectedIndex==2)//22 said node
{
From3 - & gt; Show ();
}
}
CodePudding user response:
This requirement, without processing in the OnChange event, in a TreeView OnClick event processing, first determines the TreeView - & gt; Selected is not NULL, and then, according to the Index of the Selected Text or other properties determine which node, make corresponding processing line,CodePudding user response:
Demon elder brother 51 didn't rest?CodePudding user response:
In the holiday, but still thinking of CSDN, so up to look at it, whenever you have
CodePudding user response:
I am idle bored, to CSDN to see
CodePudding user response:
Complement, in click OnClick event processingCodePudding user response:
Thank you for your answer, problem solved! There's just one problem:In c + + builder need a time to scroll on the system screen, for example, "today is: on May 1, 2013 on Wednesday," the next day is on Thursday, May 2, 2013, "", need to add the code in the time function? To solve?
CodePudding user response:
Time rolling? This did not understand what you want to effect,CodePudding user response:
What call time rolling?CodePudding user response:

CodePudding user response:

CodePudding user response:
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
//time on Label control and time control Label position, realize the rolling
Void __fastcall TForm1: : Timer1Timer (TObject * Sender)
{
//the size of the font rolling, here is set to 1, time to time according to their own requirements set
Label1 - & gt; Left=Label1 - & gt; Left + 1;
//whether the font across the Panel controls, if over, set the position of the Label for the initial value
If (Label1 - & gt; Left==Panel1 - & gt; Width)
{
Label1 - & gt; Left=0;
}
}
CodePudding user response:
