My projects make extensive use of Tadvedit and Tadveditbtn. I am reviewing them for compliance with the Windows 7 UXGuide and I realized that I need to add accelerators to the labels. Although add "&" to the text of tadvedit.caption underlines the appropriate letter, the edit field does not receive focus when the accelerator key is pressed. Is there an option that needs to be enabled? If not, could you add this feature? Otherwise the label feature is not very useful for compliant programs -- one would need to use a TLabel in conjunction with a TAdvedit rather than the label property of the tadvedit.
I have retested this here and cannot see an issue.
This is on the form:
object Label1: TLabel
Left = 168
Top = 173
Width = 35
Height = 13
Caption = 'Label &C'
FocusControl = Edit1
end
object AdvEdit1: TAdvEdit
Left = 208
Top = 117
Width = 121
Height = 22
EmptyTextStyle = []
LabelCaption = 'Label &A'
LabelFont.Charset = DEFAULT_CHARSET
LabelFont.Color = clWindowText
LabelFont.Height = -11
LabelFont.Name = 'Tahoma'
LabelFont.Style = []
Lookup.Font.Charset = DEFAULT_CHARSET
Lookup.Font.Color = clWindowText
Lookup.Font.Height = -11
Lookup.Font.Name = 'Arial'
Lookup.Font.Style = []
Lookup.Separator = ';'
Color = clWindow
TabOrder = 0
Text = 'AdvEdit1'
Visible = True
Version = '3.3.5.4'
end
object Edit1: TEdit
Left = 209
Top = 173
Width = 121
Height = 21
TabOrder = 1
Text = 'Edit1'
end
object Button1: TButton
Left = 254
Top = 219
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 2
end
object AdvEdit2: TAdvEdit
Left = 208
Top = 145
Width = 121
Height = 22
EmptyTextStyle = []
LabelCaption = 'Label &B'
LabelFont.Charset = DEFAULT_CHARSET
LabelFont.Color = clWindowText
LabelFont.Height = -11
LabelFont.Name = 'Tahoma'
LabelFont.Style = []
Lookup.Font.Charset = DEFAULT_CHARSET
Lookup.Font.Color = clWindowText
Lookup.Font.Height = -11
Lookup.Font.Name = 'Arial'
Lookup.Font.Style = []
Lookup.Separator = ';'
Color = clWindow
TabOrder = 3
Text = 'AdvEdit1'
Visible = True
Version = '3.3.5.4'
end
and pressing Alt-A, Alt-B, Alt-C focuses the correct edit control
Sorry,,,I agree this works.