pro_imaj Posted August 18, 2022 Share Posted August 18, 2022 Hi, I'm calling Frame inside a UniPageControl inside a form. When I press the tab key in the uniedits in the frame I call, the next edit is not positioned. I have tried almost every way but the result is negative. When I add uniedits on UnipageControl and compile it, when I press the tab key, it is positioned to the other uniedit. Why can this be a problem with the edits inside the frame. I am creating Frame in Unipagecontrol as below. procedure TFShowModal.UniFormBeforeShow(Sender: TObject); var FCurrentFrame: TUniFrame; begin FCurrentFrame := TUniFrameClass(FrameAd).Create(Self); FCurrentFrame.Align := alClient; FCurrentFrame.Parent := UniTabSheet1; Refresh; end; Quote Link to comment Share on other sites More sharing options...
Darth Florus Posted August 18, 2022 Share Posted August 18, 2022 Hi Pal: Use InsertComponent Method or InsertControl instead of change the parent property. When FfrmPopup is a TUniForm: Example 1: { Crear un origen de datos } FdsPopLista := TDataSource.Create(FfrmPopup); FfrmPopup.InsertComponent(FdsPopLista); Example 2: { Crear una grilla } FdbgPopLista := TUniDBGrid.Create(FfrmPopup); FdbgPopLista.Align := alClient; FfrmPopup.InsertControl(FdbgPopLista); Best Regards Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted August 19, 2022 Author Share Posted August 19, 2022 8 hours ago, Darth Florus said: Hi Pal: Use InsertComponent Method or InsertControl instead of change the parent property. When FfrmPopup is a TUniForm: Example 1: { Crear un origen de datos } FdsPopLista := TDataSource.Create(FfrmPopup); FfrmPopup.InsertComponent(FdsPopLista); Example 2: { Crear una grilla } FdbgPopLista := TUniDBGrid.Create(FfrmPopup); FdbgPopLista.Align := alClient; FfrmPopup.InsertControl(FdbgPopLista); Best Regards @Darth Florus Hi, Thanks for the answer, I couldn't adapt it to the code I wrote above, could you please give the example accordingly. procedure TFShowModal.UniFormBeforeShow(Sender: TObject); var FCurrentFrame: TUniFrame; begin FCurrentFrame := TUniFrameClass(FrameAd).Create(Self); FCurrentFrame.Align := alClient; FCurrentFrame.Parent := UniTabSheet1; Refresh; end; Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted August 24, 2022 Author Share Posted August 24, 2022 Could you help me to solve this problem? 😊 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 24, 2022 Share Posted August 24, 2022 Hello, Do you have a simple testcase to check? Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted August 25, 2022 Author Share Posted August 25, 2022 18 hours ago, Sherzod said: Hello, Do you have a simple testcase to check? Hi @Sherzod Thank you for your interest. I prepared the example you wanted, I cannot navigate between the tab and edits on the screen that opens as ShowModal when you press the button. Test.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 25, 2022 Share Posted August 25, 2022 35 minutes ago, pro_imaj said: I prepared the example you wanted, I cannot navigate between the tab and edits on the screen that opens as ShowModal when you press the button. Can you try? 1 Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted August 25, 2022 Author Share Posted August 25, 2022 1 hour ago, Sherzod said: Can you try? @Sherzod Thank you very much, my problem is solved. So glad to have you. 1 Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted August 25, 2022 Author Share Posted August 25, 2022 42 minutes ago, pro_imaj said: @Sherzod Thank you very much, my problem is solved. So glad to have you. @Sherzod This time it doesn't match the TabOrder order, I searched the forum and couldn't find the solution. What should I do? I am attaching the test project. Test2.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 25, 2022 Share Posted August 25, 2022 I will try to check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 25, 2022 Share Posted August 25, 2022 21 minutes ago, pro_imaj said: This time it doesn't match the TabOrder order, I searched the forum and couldn't find the solution. What should I do? Could you use CreateOrder instead (starting from value 1) ? Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted August 25, 2022 Author Share Posted August 25, 2022 9 minutes ago, Sherzod said: Could you use CreateOrder instead (starting from value 1) ? @Sherzod Unfortunately it doesn't work, you can see the example in the attachment. If there is this problem, how do people develop a screen with a frame? The example is attached. Test3.zip Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted August 25, 2022 Author Share Posted August 25, 2022 I found the source of the problem with CreateOrder; When processing with CreateOrder, it should be started from 1, since I start from 0, edits are not positioned when 0 in all other objects. This is not a definitive solution, normally it should have been resolved with TabControl. Thanks for your help. @Sherzod Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.