Am 26.10.2012 um 10:53 schrieb Massimo Valle <[email protected]>:

> I have a NSSearchFieldMBS control which I have to set in focus when the user 
> press a key. So my window will handle the KeyDown event, set the focus to the 
> NSSearchField and set its text to the key typed (which was handled by the 
> Window.Keydown event).


You can do that this way:

  CocoaControlMBS1.setFocus
  
  n.StringValue = key
  dim e as NSTextMBS = n.currentEditor
  if e<>Nil then
    e.selectedRange = new NSRangeMBS(e.textLength,0)
  end if
  
  Return true
  
With next plugin as I just added a few methods for this.

Greetings
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to