Jump to content

Tab problem in frame edits


pro_imaj

Recommended Posts

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;

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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 HiThanks 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;
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...