ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

article
part 1
part 2
part 3
part 4
part 5


3 - Objects, Objects, Objects

The editor does not contain all the objects the eBookMan uses in the GUI (graphical user's interface). As well, not all objects are immediately useful, and require program code to use. The editor creates only the initialization code to display the form (the constructor). However, code to activate the objects is more straightforward to write, since initial settings and object creation are taken care of.

The objects available in the form editor include:
  • CForm - the class for the form itself. There is only one onscreen at a time. Creating multiple form objects is a simple matter of saving and loading from files (menu options File/New Form, File/Load, File/Save Form and File/Save As). Some of the unique attributes of the form object are the Portrait Orientation (change to false to make the form display in landscape mode) and Title Bar (false turns it off). Other options, such as Save Under Window and Close Button are best left as is unless you have specific reasons to adjust. The two other fields, Class Name and Form Number Base, will be discussed in more detail in part two.
  • CButton, CPushButton, CRepeatButton - these three objects represent the three buttons in the ebm GUI; the ordinary button, the pushbutton (with push to close, push to open action), and the repeat button, which will continue sending messages while held down.
  • CCheckBox - the checkbox object. Note that the check status has to be set in code, and can't be set here.
  • CLabel - the text display object, useful for static captions.
  • CScrollBar, CProgressBar - these provide independent scroll and progress displays. Unlike other controls, these have no width and height displayed. For example, if a scrollbar is horizontal, there is no width to adjust. Likewise, a vertical progress bar has no height to adjust. For this reason, there is a single Size field, dealing with the adjustable dimension, along with a flag for horizontal or vertical display.
  • CTable - the table object created is bare bones, since it needs programming to add to it, populate it, etc. However, using this object in the editor does take care of placement and sizing.
  • CRect - this is the basic object for drawing lines and colored rectangles. Unfortunately, without additional coding the only color that is displayed is black.
  • CIcon - this is the static display of an image. On the form editor, there is no support for loading and displaying images (see the Franklin website documentation on the bitmap convert program). However, this allows you to set up the position of an image, and add the program data later.
  • CTimeEdit and CDateEdit - these are the time/date pick controls. Although width and height are displayed, they cannot be adjusted.
  • CTextEdit - arguably the most useful text control, this object can be used both for text entry and text display (such as help information). It has several display option flags (note that the flags will not change the display on the form editor, only in the final code):
    • Set No Edit - read only flag
    • Set No Underline - removes the dotted underline
    • Set One Line - prevents multiple line displays
    • Set Password - displays a password character instead of the plain text


Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice