User Tools

Site Tools


Sidebar

<< Back


koda:en:documentation:control_form

Form

{|class=“cboxtable”

class=“cboxcell1”
class=“cboxcell2”

A form is created by doing File → New and selecting a template from the Form Templates dialog or by clicking on the New form toolbar button.
#remarks_header[Properties:]#

CaptionText that appears in the title bar. Can contain % variables.
ClientHeightHeight of client area in pixels
ClientWidthWidth of client area in pixels
ColorBackground color
ContextMenuSpecifies context menu to attach to form. Create the ContextMenu control first
CursorCursor shape to display when mouse is not over a control that has a shape specified
DescriptionAllowed to enter form description. This text is for informational use only, like in templates gallery.
EnabledFalse generates <color blue>GUISetState(@SW_DISABLE)</color>
FontDouble-click to the right to open the Font dialog. Click on + to show the Color, Name, Size and Style properties
Left,TopPosition of the form, in pixels: see Position
Width,HeightSize of form, in pixels
HintText that appears when mouse hovers over form. Overridden by Hints for controls
IconIcon in title bar. To specify, double click to right. html_wikilink('proped_images_editor','') opens
MenuSpecifies html_wikilink('control_menu','menu') to attach to form. html_wikilink('create_menu','Create the Menu control') first
NameName of form and of the variable that is assigned its window handle in generated code. If not specified, no variable is generated
OnClose
OnMaximize
OnMinimize
OnRestore
For each of these events Koda generates (in Message Loop mode) a <color blue>Case</color> or (in OnEvent mode) a call to <color blue>GUISetOnEvent</color> and a skeleton event function. Double-click to right to open Events Editor
ParentFormFor child form, name of parent. If not specified, parent is Desktop
PositionForm position:
poDesigned - if Parent specified, Left and Right are relative to Parent, else relative to Desktop
poDesktopCenter - centered on Desktop
poFixed - Left and Right are desktop co-ordinates
ResizingClick on + to expand resize modes:
DocAuto - resize and reposition according to new window size
DocRight - Do not move right side
DocLeft - Do not move left side
DocTop - Do not move top
DocBottom - Do not move bottom
DocHCenter - Horizontal center remains fixed
DocVCenter - Vertical center remains fixed
DocWidth - Width does not change
DocHeight - Height does not change
TrayMenuSpecifies html_wikilink('control_traymenu','tray menu') to attach to form. html_wikilink('create_menu','Create the TrayMenu control') first
VisibleFalse hides the form

#remarks_header[Styles:]#

Constant Description Comments
WS_MAXIMIZEBOXForm has a maximize box
WS_MINIMIZEBOXForm has a minimize box
WS_SIZEBOXForm has a re-sizing border Same as WS_THICKFRAME
WS_SYSMENUForm has system menu on title barRequires WS_CAPTION
WS_DLGFRAMEForm has double border but no titlebar
WS_CAPTIONForm has title bar Includes WS_BORDER
WS_OVERLAPPEDWINDOWForm is window with WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, WS_MAXIMIZEBOX Same as WS_TILEDWINDOW
WS_MAXIMIZEForm is initially maximized
WS_CLIPCHILDRENExcludes area occupied by child windows when drawing occurs within the parent window Used when creating the parent window
WS_MINIMIZEForm is initially minimized
WS_CHILDForm is a child windowcannot have menu bar. Cannot be used with WS_POPUP
WS_POPUPCreates a pop-up window Cannot be used with WS_CHILD
WS_POPUPWINDOWForm is window with WS_BORDER, WS_POPUP, WS_SYSMENU To make menu visible, check WS_CAPTION
$WS_OVERLAPPEDForm has title bar and border Same as WS_TILED
WS_HSCROLLForm has horizontal scroll bar
WS_VSCROLLForm has vertical scroll bar
WS_BORDERForm has a thin-line border
WS_CLIPSIBLINGSIf form overlaps another, this form shows fully
DS_MODALFRAMEForm is dialog box with modal frame Check WS_CAPTION for title bar, WS_SYSMENU for system menu

#remarks_header[Extended Styles:]#

WS_EX_ACCEPTFILESForm accepts file names into Edit and Input controls via drag-and-drop 1)
WS_EX_MDICHILDForm is one of several that can be worked on simultaneously – like MDI
WS_EX_APPWINDOWWhen the Form is visible, force it onto taskbar
WS_EX_CONTEXTHELPPuts ? in title bar. Cannot use with WS_MAXIMIZEBOX and WS_MINIMIZEBOX. Same as WS_CONTEXTHELP
WS_LEFTSCROLLBARFor right-to-left languages, moves vertical scroll bar (if any) to the left
WS_EX_OVERLAPPEDWINDOW Form has raised edges and sunken client area
WS_EX_RIGHTFor right-to-left languages, text in Form and controls flows right to left
WS_EX_TOOLWINDOWForm is a toolbar, intended to be floating 2)
WS_EX_TOPMOSTForm is always on top
WS_EX_TRANSPARENTForm appears to be transparent because underlying sibling windows are painted before this Form
WS_EX_WINDOWEDGEForm has raised edges
WS_EX_LAYEREDForm is layered window. Cannot be used for child windows
WS_EX_COMPOSITEDForm is painted using double buffering, reducing flicker

#remarks_header[Remarks:]# None #remarks_header[Related:]#

None

1)
WS_EX_ACCEPTFILES: To enable for an Edit or Input control, also check GUI_DROPACCEPTED in its styles
2)
WS_EX_TOOLWINDOW: A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font.
koda/en/documentation/control_form.txt · Last modified: 2014/07/10 10:47 (external edit)