Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
Dim tf As TextField = CreateTextField
Page1.RootPanel.AddView(tf, 10dip, 10dip, 200dip, 50dip)
End Sub
Sub CreateTextField As TextField
Dim no As NativeObject
no = no.Initialize("MyTextField").RunMethod("new", Null)
Dim tf As TextField
tf = no
tf.BorderStyle = tf.STYLE_ROUNDEDRECT
Return tf
End Sub
#if OBJC
@end
@interface MyTextField : UITextField
@end
@implementation MyTextField
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
return NO;
}
#End If