Jump to content

Setting TabStop To True During Runtime Has No Effect


Frederick

Recommended Posts

I have three controls that have their TabStop properties set to False at design time. When I set the TabStop properties to True at runtime, I cannot tab from control to control.

Is this a bug?

Interestingly, if the TabStop properties are True at design time and I set the TabStop properties to False at runtime, the behaviour is correct, in that I cannot tab from control to control.

P.S.    I have attached the testcase.

--
Frederick
(UniGUI Complete - Professional Edition 1.90.0.1549)
 

tabruntime.zip

Link to comment
Share on other sites

  • 9 months later...

What is the status of this report? I am now using UniGUI 1.90.0.1558 and setting TabStop to False in the OnShow event during runtime still does not result in the control being bypassed when I press ENTER to move from control to control.

If I set the control to False at design time, the behaviour of bypassing the control is correct.

Link to comment
Share on other sites

  • 5 months later...
On 8/5/2022 at 12:09 PM, Frederick said:

I am using version 1.90.0.1562 and this suggestion that used to work before no longer does.

Please confirm this.

Hello,

I don't understand what is not working for you. The test case does not give a complete picture of what is not working. Please check again.

Link to comment
Share on other sites

6 hours ago, Sherzod said:

Hello,

I don't understand what is not working for you. The test case does not give a complete picture of what is not working. Please check again.

I have created a simpler project. All four controls have their TabStop properties disabled at design time.

In the OnReady event of the form, I enabled the TabStop properties for all controls.

When I try to tab from control to control during runtime, nothing happens.

tabruntime.7z

Link to comment
Share on other sites

6 hours ago, Sherzod said:

Okay. Confirmed.

But why do you need such a case. For now, you can set this at designtime, and optionally set it to false/true at runtime.

 

I have 3 users who are not allowed to edit fields and 1 user who is allowed. At design time, I set all fields to ReadOnly:=True and TabStop:=False. When the 1 user who is allowed to edit the fields logs in, I set the fields to ReadOnly:=False and TabStop:=True.

As you have tested, setting the TabStop:=True at runtime does not work.

Link to comment
Share on other sites

6 hours ago, Frederick said:

As you have tested, setting the TabStop:=True at runtime does not work.

If in desingtime is set to false.

So:

12 hours ago, Sherzod said:

For now, you can set this at designtime, and optionally set it to false/true at runtime.

Set to true.

Link to comment
Share on other sites

5 hours ago, Sherzod said:

Set to true.

Where else should I set it to True?

The following code does not work:-

procedure TfrmMain.UniFormReady(Sender: TObject);
begin
   edt1.TabStop:=True;
   cbo1.TabStop:=True;
   edt2.TabStop:=True;
   edt3.TabStop:=True;
   edt1.SetFocus;
end;

Link to comment
Share on other sites

Sherzod,

I do know that I can set the TabStop to True at designtime. I can even set this property at runtime in VCL and it will work.

However, I am looking for a solution in UniGUI on how to set it during runtime and work.

If you have a solution now or if it will be fixed in the next build, please let me know.

Link to comment
Share on other sites

2 hours ago, Frederick said:

if it will be fixed in the next build

We will check.

2 hours ago, Frederick said:

If you have a solution now

On 8/6/2022 at 9:08 PM, Sherzod said:

For now, you can set this at designtime, and optionally set it to false/true at runtime.

 

Link to comment
Share on other sites

2 hours ago, Frederick said:

Sherzod,

I do know that I can set the TabStop to True at designtime. I can even set this property at runtime in VCL and it will work.

However, I am looking for a solution in UniGUI on how to set it during runtime and work.

If you have a solution now or if it will be fixed in the next build, please let me know.

 

I think @Sherzodis suggesting to not change the tabstop property at design time (leave it with the default true value) and change it only at designtime.

Roberto

 

  • Upvote 1
Link to comment
Share on other sites

I did more testing and this is weird but it works.

1.   Set the TabStop properties for all controls to True at designtime

2.   At runtime, I was able to change the TabStop properties to False and back to True at will.

Note: It does not have to be from the OnReady event of the form.

If the controls' TabStop properties are False at designtime, I cannot change the TabStop properties at runtime.

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...