Is something wrong with setfocus to a textctrl?
On treectrl; OnInit:
It is writing the text, setting the selection, but not getting any keyboard focus. The focus remains on the Tree control, rather then switching to txtFunctionCode (TextCtrl).
Am I missing something or is this a bug?
On treectrl; OnInit:
connectany(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, Clicked)
Function Clicked(_Event:wxEvent) Local Tree:wxTreeCtrl = MyTree(_event.parent) Local Obj:TPresetItem = TPresetItem(tree.GetItemData(Tree.GetSelection())) If Obj Then txtFunctionCode.WriteText(Obj.Conversion) Local F:Int, T:Int txtFunctionCode.GetSelection(F, T) txtFunctionCode.SetSelection(f - (obj.Selection + 1), (f - (obj.Selection + 1)) + Obj.selection) txtFunctionCode.SetFocus() End If End Function
It is writing the text, setting the selection, but not getting any keyboard focus. The focus remains on the Tree control, rather then switching to txtFunctionCode (TextCtrl).
Am I missing something or is this a bug?