View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009031 | MMW v4 | Framework: Scripts/Extensions | public | 2012-01-28 15:15 | 2012-04-26 23:32 |
Reporter | zvezdan | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 4.0.4 | Fixed in Version | 4.0.5 | ||
Summary | 0009031: Alt hotkey doesn't work with Label controls | ||||
Description | If I create e.g. a check box with the caption "&Test" and if I press Alt+T that check box would be toggled. However, if I create a label with the caption "&Test" and if I press Alt+T nothing would happen (assuming that there is not any other control with the same hotkey on the same form). In some programming languages the press of the label's hotkey would transfer keyboard focus to the next control according to the tab order of the form. For example, if I have: Set oLbl = SDB.UI.NewLabel(oForm) oLbl.Caption = "&Test" Set oCbo = SDB.UI.NewDropDown(oForm) then press on the Alt+T would transfer focus to the oCbo dropdown. | ||||
Tags | No tags attached. | ||||
Fixed in build | 1480 | ||||
|
I think that it would work in case the label is linked with the control - i.e. we would have to give scripters an API to link a label with its control. |
|
There is no need to link the label to the control. Visual Basic has no any new label property to specify such thing. As I said, it works according to the TabIndex property. For example, if I have one form with one label and after it one text box, then that label is automatically linked to that text box because it precedes it in the Tab order. |
|
Fixed in build 1601. Note that the implementation is not identical, but rather similar, because in Delphi the Labels cannot be focused and thus cannot have tab index. Therefore I used following approach: Controls are linked based on order of its creation, i.e. if you create 4 new controls in the following order: Label1, EditBox1, Label2, EditBox2 then Label1 is linked with EditBox1 and Label2 is linked with EditBox2. Note also that only controls with the same parent are paired. |
|
Nice solution, but now when we have TabIndex property, I am wondering what would happen if I change TabIndex of EditBox1 from your example to e.g. 3. Would the hotkey of Label1 still work with it? By the way, where is the b1600 which was mentioned before in other issues? If it is not published yet, why didn't you include that solution in it? |
|
yes, it will still work, tab index is independent on the linking. b1600 is internal 4.1 build, which is not published, because it is in a pre-alfa state |
|
Merged into 4.0.4.1480 |
|
Verified 1484 |