FutureBasic Logo

<<    Index    >> FutureBasic

Interface elements   Manual



Windows
Windows are created with the window statement and are positioned relative to the bottom-left of the screen. A window is identified by its tag value. Many of the window statement parameters are optional and if omitted will default to appropriate values.

Widgets
Widgets have their own keyword to construct in code. A widget is positioned relative to the bottom-left of its parent view (usually the window’s content view). A widget is identified by its tag value. Many of the widget statement parameters are optional and if omitted will default to appropriate values.

Menus
Menus and menu items are created using the menu statement. Menus and items are identified by their index value (item indexes are zero-based). A menu with an index value in the range 1 - 100 is placed in the main menu. Menus with indexes of 101+ are built off-screen.

Autoreleased objects
ALL interface element functions (even those with names containing the words ‘init’, 'create' or ‘copy') return autoreleased objects so these objects must not be CFRelease(d).

Working with nibs
With nib files, you create and manipulate your user interfaces graphically, using Xcode, instead of programmatically. Because you can see the results of your changes instantly, you can experiment with different layouts and configurations very quickly. You can also change many aspects of your user interface later without rewriting any code.

Subclassing nib elements
To subclass a widget contained in a nib, change the widget's class name in the identity inspector. For example, to subclass a nib textfield, set its class name to "TextFieldSC". Note class names are case-sensitive and are made up of the widget name plus "SC" suffix.

Tutorials
Nib tutorials