Freeman35 Posted November 2, 2017 Share Posted November 2, 2017 Hello, Is this bug? TUniDBFormattedNumberEdit.Focused always "False" or how to get isfocused property of uniEdits (TUnidbEdit, lookupcombobox etc.) ? thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 2, 2017 Share Posted November 2, 2017 Hello, Where do you call this method ?! Best regards, Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 2, 2017 Author Share Posted November 2, 2017 Hello, memtable.FieldByName('field1').OnChange:= Field1Change; .. procedure TFRM_.Field1Change(Sender: TField); begin if not EDT_Field1.Focused then Exit; memtable.FieldByName('Field2').AsFloat:= Sender.AsFloat; end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 2, 2017 Share Posted November 2, 2017 Hello, memtable.FieldByName('field1').OnChange:= Field1Change; .. procedure TFRM_.Field1Change(Sender: TField); begin if not EDT_Field1.Focused then Exit; memtable.FieldByName('Field2').AsFloat:= Sender.AsFloat; end; It seems at that moment, it is already losing focus, is not it ?! Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 2, 2017 Author Share Posted November 2, 2017 Yes, if not EDT_Field1.Focused then Exit; always work this code. EDT_Field1's field is Field1. While typing in edit, event triggered, but Focused property always False. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 2, 2017 Administrators Share Posted November 2, 2017 Focused method is not implemented in uniGUI. What you call is actually VCL Focused method which returns an incorrect result. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 2, 2017 Author Share Posted November 2, 2017 Are you mean, don't use this method, use different way? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 2, 2017 Administrators Share Posted November 2, 2017 There is no way to understand that a component is focused from server side. In uniGUI when a user focuses a control that information is not sent to the server. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 2, 2017 Author Share Posted November 2, 2017 Okey, thank you for explain. Just idea & suggestion: OnEnter &OnExit event work normal, Can add new property, for example Entered, and/or Exited boolean property ? this can be easy control for focused. Much better then add more code on our project. Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.