RadioButtons tabStop independent of Checked property

3

I have a set of RadioButtons, Edits and Labels inside a GroupBox, as in the image below:

I would like the focus on Tab to focus on no RadioButton, but only on Edits, so I thought of changing the TabStop = False property of all RadioButtons.

Interestingly this property is already standard False and there is some logic (or bug) where the RadioButton that is Checked = True always has its operation as with TabStop = True , and all RadioButtons with Checked = False function as TabStop = False .

Would there be a way that TabStop = False is respected for all RadioButtons, regardless of Checked?

    
asked by anonymous 11.12.2018 / 13:36

2 answers

2

Testing this situation here I decided as follows:
In ONSHOW of form put all RadioButtons.tabstop: = False
and on the onclick of each I put the same RadioButton1.TabStop: = False code. Home That way it works too :). Home Just another way to come up with a result :)

    
12.12.2018 / 13:40
4

if (Key = VK_TAB) and (Shift = [ssShift]) then
begin
   Perform(WM_NEXTDLGCTL, 1, 0);
end
else if Key = VK_TAB then
begin
   Perform(WM_NEXTDLGCTL, 0, 0);
end;
    
11.12.2018 / 13:36