Hk_form represents a form.
Inherits from hk_presentation.
- load_form([name])
Loads the form from a file, where 'name' is the name of the form
- save_form([name[,ask]])
Saves the form to a file, where 'name' is the name of the file. if 'ask' is true and the form already exists you will be asked before the old form will be overwritten. Returns True if successful else False.
- new_grid()
The form has to be in design mode to use this function! The function will create a new hk_dsgrid in the upper left corner and returns it if successful.
- new_lineedit()
The form has to be in design mode to use this function! The function will create a new hk_dslineedit in the upper left corner and returns it if successful.
- new_bool()
The form has to be in design mode to use this function! The function will create a new hk_dsboolean in the upper left corner and returns it if successful.
- new_combobox()
The form has to be in design mode to use this function! The function will create a new hk_dscombobox in the upper left corner and returns it if successful.
- new_button()
The form has to be in design mode to use this function! The function will create a new hk_button in the upper left corner and returns it if successful.
- new_rowselector()
The form has to be in design mode to use this function! The function will create a new hk_dsrowselector in the upper left corner and returns it if successful.
- new_memo()
The form has to be in design mode to use this function! The function will create a new hk_dsmemo in the upper left corner and returns it if successful.
- new_label()
The form has to be in design mode to use this function! The function will create a new hk_label in the upper left corner and returns it if successful.
- set_designsize(width,height[,registerchange])
Sets the real size of the form. If you designed a form in i.e. 800x600 resolution and want to watch it with 1024x768 resolution, set this to 1024x768. Dynamic sized visible objects will be resized. All objects will be positioned new.
- get_visible(number)
returns an existing visible object of type hk_visible identified by a unique identifier number.
To change the hk_visible object to the type you need there are some type casting functions
To find this number, click on the object. In the caption of the property editor you can see the number in brackets.
Figure 2-6. Type casting
hk_button cast_button(hk_visible)
hk_dslineedit cast_dslineedit(hk_visible)
hk_dsmemo cast_dsmemo(hk_visible)
hk_dsgrid cast_dsgrid(hk_visible)
hk_dscombobox cast_dscombobox(hk_visible)
hk_dsboolean cast_dsboolean(hk_visible)
hk_dsvisible cast_dsvisible(hk_visible)
hk_form cast_form(hk_visible)
hk_report cast_report(hk_visible)
- get_visible(name)
returns an existing visible object of type hk_visible identified by a unique text identifier. This is a user-defined unique identifier and can be set in the property editor
The next program shows you how to start a form: