55143681 Posted February 23, 2021 Share Posted February 23, 2021 UNigui1542 cbuilder: 1: UnimTabPanel1->ActivePageIndex is Error. If 2nd is open,the ActivePageIndex is still "0" 2: if(UnimTabPanel1->ActivePage==UnimTabSheet1 ) { } else if(UnimTabPanel1->ActivePage==UnimTabSheet2) { } This code still can not judge which TabSheet has been opened,and the result is wrong. Link to comment Share on other sites More sharing options...
Sherzod Posted February 24, 2021 Share Posted February 24, 2021 On 2/23/2021 at 3:01 PM, 55143681 said: This code still can not judge which TabSheet has been opened,and the result is wrong. Hello, Please clarify again what the problem is. Link to comment Share on other sites More sharing options...
55143681 Posted February 25, 2021 Author Share Posted February 25, 2021 19 hours ago, Sherzod said: Hello, Please clarify again what the problem is. I have a UnimTabPanel with sheet1 and sheet2. I can not get the correct activePageIndex, if sheet1 is active,the activePageIndex is 0; but if if sheet2 is active,the activePageIndex is still 0; And I can not judge which sheet is active through this follow code too: if(UnimTabPanel1->ActivePage==UnimTabSheet1 ) { ShowMessageN("sheet1"); } else if(UnimTabPanel1->ActivePage==UnimTabSheet2) { ShowMessageN(sheet2); } Although,the sheet2 is active,but I still will get sheet1 Link to comment Share on other sites More sharing options...
55143681 Posted February 26, 2021 Author Share Posted February 26, 2021 19 hours ago, 55143681 said: I have a UnimTabPanel with sheet1 and sheet2. I can not get the correct activePageIndex, if sheet1 is active,the activePageIndex is 0; but if if sheet2 is active,the activePageIndex is still 0; And I can not judge which sheet is active through this follow code too: if(UnimTabPanel1->ActivePage==UnimTabSheet1 ) { ShowMessageN("sheet1"); } else if(UnimTabPanel1->ActivePage==UnimTabSheet2) { ShowMessageN(sheet2); } Although,the sheet2 is active,but I still will get sheet1 See the demo and the video please: procedure TMainmForm.UnimBitBtn1Click(Sender: TObject); begin ShowMessageN(UnimTabPanel1.ActivePageIndex.ToString); end; See the video. 6a4b18b7006043a5fd1e7a68f0a8cf52.mp4 Link to comment Share on other sites More sharing options...
55143681 Posted March 10, 2021 Author Share Posted March 10, 2021 On 2/26/2021 at 2:22 PM, 55143681 said: See the demo and the video please: procedure TMainmForm.UnimBitBtn1Click(Sender: TObject); begin ShowMessageN(UnimTabPanel1.ActivePageIndex.ToString); end; See the video. 6a4b18b7006043a5fd1e7a68f0a8cf52.mp4 675.54 kB · 0 downloads Sherzod: How to resolve this? Link to comment Share on other sites More sharing options...
55143681 Posted March 17, 2021 Author Share Posted March 17, 2021 On 3/10/2021 at 7:23 PM, 55143681 said: Sherzod: How to resolve this? Sherzod: Can you give me some advice about this? I am waiting for you for so many days. Link to comment Share on other sites More sharing options...
Sherzod Posted March 17, 2021 Share Posted March 17, 2021 2 hours ago, 55143681 said: Can you give me some advice about this? I am waiting for you for so many days. Hello, Sorry for the late response. Please at least use an empty event handler for now: procedure TMainmForm.UnimTabPanel1Change(Sender: TObject); begin // end; Link to comment Share on other sites More sharing options...
55143681 Posted March 17, 2021 Author Share Posted March 17, 2021 45 minutes ago, Sherzod said: Hello, Sorry for the late response. Please at least use an empty event handler for now: procedure TMainmForm.UnimTabPanel1Change(Sender: TObject); begin // end; In OnChange Event,that works right,but do you have a plan to corret the bug ? Link to comment Share on other sites More sharing options...
Sherzod Posted March 17, 2021 Share Posted March 17, 2021 Just now, 55143681 said: In OnChange Event,that works right,but do you have a plan to corret the bug ? Yes, we'll fix it. Link to comment Share on other sites More sharing options...
Recommended Posts