Jump to content

TCustomeCanvasControl Focus

Recommended Posts

  • 2 weeks later...
  • Administrators

CBFocused and CBLostFocused are bound to JavaScript 'onfocus' and 'onblur' events which are not supported for all HTML elements. They don't work on DIV elements (which is the basis for most Smart controls), just on INPUT, A, and maybe some other elements. (See http://javascript.info/tutorial/focus-blur).


That basically means that you'll only get those events triggered if you descend your control from TW3EditBox or TW3CheckBox which are implemented as a INPUT element. In that case, you can simply override the CBFocused/CBLostFocused in your control.


  TMyControl = class(TW3EditBox) 
    procedure CBFocused; override; 
    procedure CBLostFocus; override; 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...