Jump to content

UnimTabPanel:It's ActivePageIndex is error.


55143681

Recommended Posts

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

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

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;

1288320008__20210226141904.thumb.jpg.e5728ce1e53868f6632afd49111d0719.jpg

 

See the video.

Link to comment
Share on other sites

  • 2 weeks later...
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

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

×
×
  • Create New...