diff options
author | Ian C <ianc@noddybox.co.uk> | 2006-01-15 21:03:13 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2006-01-15 21:03:13 +0000 |
commit | 54804f01a188865cdf16462ecb9f4a5800102e08 (patch) | |
tree | e3497b713801d56378c18838da163b26e0918b70 /mwidget | |
parent | 3160a0fb88ccfdb1410a376f54af5c93f3b5fa38 (diff) |
Diffstat (limited to 'mwidget')
-rw-r--r-- | mwidget/test.bmx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mwidget/test.bmx b/mwidget/test.bmx index c0f7cc3..f8d8a19 100644 --- a/mwidget/test.bmx +++ b/mwidget/test.bmx @@ -5,7 +5,7 @@ Import noddybox.mwidget Incbin "icons.png"
Incbin "toolbar.png"
-Const SUBCLASS:Int=True
+Const SUBCLASS:Int=False
Const TESTTIMER:Int=False
Global top:TMWindow
@@ -95,6 +95,10 @@ Function OnResize(o:TMWidget, x:Int, y:Int) w.StatusText("(Callback) ["+x+","+y+"]")
End Function
+Function OnDrop(w:TMWidget, path:String)
+ Notify("Dropped~n" + path)
+End Function
+
Function OnPress_OK(o:TMWidget)
top.Close()
End Function
@@ -300,6 +304,10 @@ Type MyApp Extends TMWindow Method OnResize(x:Int, y:Int)
StatusText("["+x+","+y+"]")
End Method
+
+ Method OnDrop(path:String)
+ Notify("Dropped~n" + path)
+ End Method
End Type
Type MyOK Extends TMButton
@@ -627,13 +635,14 @@ End Function '
If SUBCLASS
- top=New MyApp.Create("Test Managed Widgets",100,100,640,400,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS|WINDOW_RESIZABLE|WINDOW_MENU)
+ top=New MyApp.Create("Test Managed Widgets",100,100,640,400,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS|WINDOW_RESIZABLE|WINDOW_MENU|WINDOW_ACCEPTFILES)
Else
- top=New TMWindow.Create("Test Managed Widgets",100,100,640,400,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS|WINDOW_RESIZABLE|WINDOW_MENU)
+ top=New TMWindow.Create("Test Managed Widgets",100,100,640,400,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS|WINDOW_RESIZABLE|WINDOW_MENU|WINDOW_ACCEPTFILES)
top.OnCloseEvent.Add(OnClose)
top.OnTimerEvent.Add(OnTimer)
top.OnMoveEvent.Add(OnMove)
top.OnResizeEvent.Add(OnResize)
+ top.OnDropEvent.Add(OnDrop)
EndIf
top.MinSize(top.Width(),top.Height())
|