Platforms to show: All Mac Windows Linux Cross-Platform

/MacControls/Search Field/NSSearchFieldControl test


Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacControls/Search Field/NSSearchFieldControl test

This example is the version from Wed, 28th Feb 2017.

Project "NSSearchFieldControl test.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control NSSearchFieldControlMBS1 Inherits NSSearchFieldControlMBS
ControlInstance NSSearchFieldControlMBS1 Inherits NSSearchFieldControlMBS
EventHandler Sub Action() log CurrentMethodName TextField1.text = me.View.StringValue End EventHandler
EventHandler Sub Close() log CurrentMethodName End EventHandler
EventHandler Function ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) As Boolean log CurrentMethodName End EventHandler
EventHandler Function ContextualMenuAction(hitItem as MenuItem) As Boolean log CurrentMethodName End EventHandler
EventHandler Function DragEnter(obj As DragItem, action As Integer) As Boolean log CurrentMethodName End EventHandler
EventHandler Sub DragExit(obj As DragItem, action As Integer) log CurrentMethodName End EventHandler
EventHandler Function DragOver(x As Integer, y As Integer, obj As DragItem, action As Integer) As Boolean log CurrentMethodName End EventHandler
EventHandler Sub DropObject(obj As DragItem, action As Integer) log CurrentMethodName End EventHandler
EventHandler Function KeyDown(Key As String) As Boolean log CurrentMethodName+" "+key End EventHandler
EventHandler Sub KeyUp(Key As String) log CurrentMethodName+" "+key End EventHandler
EventHandler Sub MouseEnter() log CurrentMethodName End EventHandler
EventHandler Sub MouseExit() log CurrentMethodName End EventHandler
EventHandler Sub MouseMove(X As Integer, Y As Integer) log CurrentMethodName End EventHandler
EventHandler Function MouseWheel(X As Integer, Y As Integer, deltaX as Integer, deltaY as Integer) As Boolean log CurrentMethodName End EventHandler
EventHandler Sub Open() log CurrentMethodName End EventHandler
End Control
Control Listbox1 Inherits Listbox
ControlInstance Listbox1 Inherits Listbox
End Control
Control TextField1 Inherits TextField
ControlInstance TextField1 Inherits TextField
End Control
Control Label1 Inherits Label
ControlInstance Label1 Inherits Label
EventHandler Function MouseDown(X As Integer, Y As Integer) As Boolean NSSearchFieldControlMBS1.SetFocus Return true End EventHandler
End Control
Sub log(s as string) listbox1.InsertRow 0, s End Sub
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

See also:

The items on this page are in the following plugins: MBS MacControls Plugin.


The biggest plugin in space...