View Issue Details

IDProjectCategoryView StatusLast Update
0009031MMW v4Framework: Scripts/Extensionspublic2012-04-26 23:32
Reporterzvezdan Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version4.0.4Fixed in Version4.0.5 
Summary0009031: Alt hotkey doesn't work with Label controls
DescriptionIf 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.
TagsNo tags attached.
Fixed in build1480

Relationships

related to 0009030 closedjiri ISDBUICommon::TabIndex property needed 

Activities

jiri

2012-01-30 19:58

administrator   ~0030150

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.

zvezdan

2012-01-30 21:14

updater   ~0030152

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.

Ludek

2012-03-13 20:52

developer   ~0030663

Last edited: 2012-03-13 20:54

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.

zvezdan

2012-03-14 08:59

updater   ~0030669

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?

Ludek

2012-03-14 11:08

developer   ~0030670

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

Ludek

2012-03-23 11:11

developer   ~0030751

Merged into 4.0.4.1480

peke

2012-04-26 23:32

developer   ~0030935

Verified 1484