ckdialog

posted Aug. 17 2001 under
FileReleasedDownloads
ckdialog-0.1.zip Aug. 17 2001 72

This description was found in [ckDialog_reference.txt]

======================
ckDialog Reference
======================

============================================
|
| How to Read this
|
============================================
OK, how to read this? I'm asking that question to myself, too.
Basically after the "Definition" seciton, You'll start finding the
detailed reference for each type of control starting from:
dialog, button, edit, listbox, combobox, static. In that order.
Under each controls you'll find its valid attributes, styles, xstyles,
events, variables, and actions, also in that order.  Hope this helps.
I'm planning to convert this into HTML, so that it'll be easier to
navigate.

What I'm asking is that If you want to use certain controls please
read everything in that control's section, because some functions need
or events and/or actions need certain styles in order to work.



============================================
|
| Warning
|
============================================

Sorry, I pretty much copied and pasted a lot of things, so there might
be some mistakes in referencing control types, but it still
too me a lot lot of time, so I didn't get much change proof reading it.



============================================
|
| Simple Data Types
|
============================================
Before going to the dialog template syntax, I have to explain some basic data types
and their definition, though they don't seem to be really helpful.



boolean
======================
can be either "true" or "false", somtimes it is expanded beyond true and false to give
more options


text
======================
It has to be quoted if it is more than two words.
Example:
	thisistext
	"This is text"
	123456blah

If you want to include characters suchs as '%', '[', ']', '\', you have to use the escape sequence
similar to C/C++ and many other languages. 

Example:
	"c:\\litestep\\litestep.exe"
	"100\%"
	"1000\r\n"	<- this would have the same result as in C/C++, the result is 
				similar to typing 1000 then press "enter", for writing files,
				you would get to a new line.





string
======================
String is very much like text except it HAS to start with an alphabet or underscore '_'.
When it contains more than two words, it has to be quoted too, and immediately following the
quote will have to be an alphabet or underscore '_'.



single_word_string
======================
Can't have more than two words and has to start with an alphabet or underscore '_'



ored_string
======================
ored_string is like having several sing_word_string separated by "|", and the whole thing
has to be quoted if there are spaces in between.  This is mainly used with styles
Example:
	string1|string2|string3
	"string1 | string2 | string3"

	string1 | string 2 | string3 <- this is incorrect




int
======================
Represents an integer, which can be negative.



unsigned_int
======================
Similar to int, but this can only be positive


hex
======================
Use this for color mostly, and it would represent RGB
Example:
	001AFF		<- Red: 00	Green: 1A	Blue: FF

	FFFFFF		<- Red: FF	Green: FF	Blue: FF
	


control_symbol
======================
control_symbol's are what you use to specify a new control such as edit, button, and etc
in your dialog. You have to remember to close your definition with ~control_symbol.
valid control symbols so far are: 
	new, dialog, button, edit, listbox, combobox, static
The new cannot appear anywhere inside a dialog template, but has to be in the first and
the last place.


attribute 	value
======================
An attribute almost always contains a key, value pair where attribute name is the key such
as title, id, size, and the next thing specified is a value separated by space, newline or tab.  
Remember if you specify a key, it HAS to be a single_word_string, and you HAVE to have a value or 
ckDialog.dll will not be able to recognize what you are doing.  Therefore, when you define a variable,
it has to follow this rule

operation
======================
operation usually consists of a single_word_string, and it's used to distinquish different actions.





============================================
|
| Definitions
|
============================================


Controls
======================
There are six different controls so far and their control symbol are:

dialog, button, edit, listbox, combobox, static



Attributes
======================
Attributes have a key value pair nature, and the keys always have the
datatype of single_word_string, the values are almost always string
except in the case of size attribute which is made up by 4 unsigned_int type.



Events
======================
Events are passive callbacks which are triggered when that event occurs, and 
there are differernt events for different type of controls.




Actions
======================
Actions are different actions that are available by each control for you to manipulate
them.







============================================
|
| Dialog
|
============================================

Dialog Template Syntax
======================
dialog
~dialog

It is also created as a top level parent when you specify
new
~new



Attributes
======================
The following attributes are valid for dialogs.

id, title, size, style, xstyle, icon, bgcolor, font, fontcolor


id	single_word_string
----------------------
The id assigned for this control


title	text
----------------------
The window title the dialog will have when created.



size	unsigned_int	unsigned_int	unsigned_int	unsigned_int
----------------------
The size of the dialog, the first two specify its left top coordinate, while
the latter two will specify its width and height.



icon		text
----------------------
the text is the path to the icon



bgcolor		hex
----------------------
specifies the background color for this dialog



font		text
----------------------
the text would specify the font face or the font type you want



fontcolor	hex
----------------------
the color for the font.




style	ored_string
----------------------
The following is a list of styles that you can apply to dialogs, though
most of them are not limited to dialogs, such as wshidden, wsdisable, wsgroup,
wstabstop, and etc.



wshidden
=-=-=-=-=-=
This style will make your control to appear hidden when created.


wsminimize
=-=-=-=-=-=
The dialog will be minimized upon creation.


wsmaximize
=-=-=-=-=-=
The dialog will be maximized upon creation.


wsdisable
=-=-=-=-=-=
The control will be disabled when first created.


wssizebox
=-=-=-=-=-=
This will let you create a dialog with sizing border, same as wsthickborder style.


wsoverlapped
=-=-=-=-=-=
This style lets you create an overlapped dialog with title bar and border.



wsoverlappedwindow 
=-=-=-=-=-=
Combination of wsoverlapped, wscaption, wssysmenu, wsthickborder, wsminimizebox, and wsmaximizebox.


wspopup
=-=-=-=-=-=
Let's you create a popup window


wspopupwindow
=-=-=-=-=-=
Combination of wsborder, wspopup, wssysmenu


wshscroll
=-=-=-=-=-=
Creates a dialog with horizontal scroll bar, though it doesn't have much
use at this time.


wsvscroll
=-=-=-=-=-=
Creats a dialog with vertical scroll bar, although it's not very useful 
for dialog control right now.


wsborder
=-=-=-=-=-=
Creates a dialog with thin-lined border


wsthickborder
=-=-=-=-=-=
Creates a dialog with thick border



wsdlgframe
=-=-=-=-=-=
Yes another type of border, but you can't have title bar with this style.



wssysmenu
=-=-=-=-=-=
Adds a sys menu to your dialog.



wscaption
=-=-=-=-=-=
Adds a title bar to your dialog (includes wsborder)


wsminimizebox
=-=-=-=-=-=
Creates a dialog that has a minimize button in the title bar.
(requires wssysmenu)


wsmaximizebox(requires WS_SYSMENU)
=-=-=-=-=-=
Creates a dialog that has a maxmized button in the title bar.
(requires wssysmenu)



wsgroup		
=-=-=-=-=-=
Allows your to group controls.  The group would have all the controls
starting with the first one that has this style and all the controls
in between until the next control that has this style.  You usually
group controls and add wstabstop to the first one to allow you to tab
between different groups, and use arrow keys to navigate in each group.
However, the wstabstop style doesn't current work.


wstabstop	(doesn't work)
=-=-=-=-=-=
Allows your to tab between any control that has this style.




wsclipchildren
=-=-=-=-=-=
Exclude the area of the child controls when drawing occurs inside the dialog.


wsclipsiblings
=-=-=-=-=-=
Clip controls when drawing.





xstyles		ored_string
----------------------

wsxclientedge
=-=-=-=-=-=
This is a very important xstyle if you want your other controls to look
normal such as edit control. Not much use for dialog.


wsxtopmost
=-=-=-=-=-=
This let's your create dailog with always on top state, sorry, you can't toggle yet.


wsxtoolwindow
=-=-=-=-=-=
This let's you to create dialogs that look like photoshop toolwindows.


wsxappwindow
=-=-=-=-=-=
Forces a toplevel dialog to be in taskbar when its minimized.


wsxmodalframe
=-=-=-=-=-=
Gives you a frame similar to modal dialog.

















Events
======================
The following events are available for dialog

init
----------------------
This is sent when dialog is first created.  Be careful that at this time
only the dialog is created and not any the controls inside the dialog.



destroy
----------------------
This is sent when dialog is destroyed.



focus
----------------------
This event happens when dialog gains keyboard focus.




blur
----------------------
This event happens when dialog loses keyboard focus.
 


move
----------------------
This is sent after dialog is moved.




size
----------------------
This is sent after dialog is resized.



ldblclick
----------------------
This is sent when user double clicks the dialog with left button.


lbuttondown
----------------------
This is sent when user press the left button.



lbuttonup
----------------------
This is sent when user release the left button.



rdblclick
----------------------
This is sent when user double clicks the dialog with right button.



rbuttondown
----------------------
This is sent when user press the right button.


rbuttonup
----------------------
This is sent when user release the right button.















Variables
======================
The available read-only variables are:

id, title, size, style, xstyle, icon, bgcolor, font, fontcolor

title: 	will be the current title instead of the one specified in
the template if the title has changed since creation.

size: 	will be in the same format you specify in your template,
it too will reflect the new changes.

everything else will not reflect the changes so far.



Actions
======================
Valid actions to do with !ckAction are:

show		boolean
----------------------
show follows a boolean to either show or hide the control.
You can also place "close" in place for the boolean, and
it will destroy the window, so no reference will be made to
that window




resize 		unsigned_int 	unsigned_int
----------------------
This actually means: 
resize 	width 	height.


move		unsigned_int	unsigned_int
----------------------
Moves the control to (unsigned_int, unsigned_int)




state		operation	boolean
----------------------
The operation can be "enable" or "focus", if it's enable, then the
following boolean means to either enable or disable it.  The boolean
has no effect if operation is "focus"



set		text
----------------------
The text will equal to the new window title you want to set.



setui		icon		text
----------------------
The text would equal to the path to the file.  
Remember to have double backslash instead of single.








============================================
|
| Button
|
============================================


Dialog Template Syntax
======================
button
~button


Attributes
======================
The following attributes are valid for dialogs.

id, title, size, style, xstyle, bgcolor, bevellight, beveldark, font, fontcolor


id	single_word_string
----------------------
The id assigned for this control


title	text
----------------------
The text on the button.



size	unsigned_int	unsigned_int	unsigned_int	unsigned_int
----------------------
The size of the dialog, the first two specify its left top coordinate, while
the latter two will specify its width and height.



bgcolor		hex
----------------------
specifies the background color for this dialog


bevellight	hex
----------------------
The light color when drawing the button border



beveldark	hex
----------------------
The dark color when drawing the button border




font		text
----------------------
the text would specify the font face or the font type you want



fontcolor	hex
----------------------
the color for the font.



style	ored_string
----------------------
The following is a list of styles that you can apply to buttons.




bsauto3state
=-=-=-=-=-=
Creates a button that looks like a 3 state check-box.


bsautocheckbox
=-=-=-=-=-=
Creates a button that looks like a check-box.



bsautoradiobutton
=-=-=-=-=-=
Creates a button that looks like radio button.



bsdefpushbutton
=-=-=-=-=-=
With this style, the button will be the default push button,
though probably isn't very useful at this time.



bspushbutton
=-=-=-=-=-=
This let's you create a push button.  This is the default style.



bspushlike
=-=-=-=-=-=
This let's you to create a button that will sink when you click. And
rise back to normal state when you click again.




bsgroupbox
=-=-=-=-=-=
This style will let you create a group box that you usuallly see on
other people's dialogs with a border square and with a text on the upper
left corner.



bsbottom
=-=-=-=-=-=
This style will bottom-align your text for the button.



bstop
=-=-=-=-=-=
This style will top-align your text for the button.




bscenter
=-=-=-=-=-=
This style will center-align your text for the button.



bsright
=-=-=-=-=-=
This style will right-align your text for the button.


bsvcenter
=-=-=-=-=-=
This style will center-align your text vertically for the button.

    
bslefttext
=-=-=-=-=-=
Place the text to the left of a radio button or check box.



bsmultiline
=-=-=-=-=-=
The text will wrapp to next line if the current line is not enough
for displaying the text.


  
bsnotify
=-=-=-=-=-=
If you want to receive double clicks on buttons, specify this to enable
the notification.  Warning: this style might slow the button reaction a little.



*Styles from the dialog that possibly work, you should probably experiment
with them


wshidden
=-=-=-=-=-=
This style will make your control to appear hidden when created.


wsdisable
=-=-=-=-=-=
The control will be disabled when first created.

wsborder
=-=-=-=-=-=
Creates a dialog with thin-lined border


wsthickborder
=-=-=-=-=-=
Creates a dialog with thick border


wsdlgframe
=-=-=-=-=-=
Yes another type of border, but you can't have title bar with this style.

wsgroup		
=-=-=-=-=-=
Allows your to group controls.  The group would have all the controls
starting with the first one that has this style and all the controls
in between until the next control that has this style.  You usually
group controls and add wstabstop to the first one to allow you to tab
between different groups, and use arrow keys to navigate in each group.
However, the wstabstop style doesn't current work.


wstabstop	(doesn't work)
=-=-=-=-=-=
Allows your to tab between any control that has this style.





xstyle
----------------------
please refer to the xstyle section in dialog





Events
======================
The following events are available for button
(I hope they work as advertised, some might not)


init
----------------------
This is sent when button is first created.  


destroy
----------------------
This is sent when button is destroyed.



focus
----------------------
This event happens when button gains keyboard focus.


blur
----------------------
This event happens when button loses keyboard focus.
 

move
----------------------
This is sent after button is moved.


size
----------------------
This is sent after button is resized.



click
----------------------
This is sent right after the user clicks the button.


dblclick
----------------------
This is sent right after the user double clicks the button.
*you'll need to specify bsnotify for this to work



disable
----------------------
This is sent when the button is disabled



push
----------------------
This is sent when the button is pushed




unpush
----------------------
This is sent when the button is unpushed











Variables
======================
The available read-only variables are:

id, title, size, style, xstyle, bgcolor, bevellight, beveldark, font, fontcolor

title: 	will be the current text on the button.


everything else will not reflect the changes so far.



Actions
======================
Valid actions to do with !ckAction are:


show		boolean
----------------------
show follows a boolean to either show or hide the control.
You can also place "close" in place for the boolean, and
it will destroy the window, so no reference will be made to
that window



resize 		unsigned_int 	unsigned_int
----------------------
This actually means: 
resize 	width 	height.


move		unsigned_int	unsigned_int
----------------------
Moves the control to (unsigned_int, unsigned_int)




state		operation	boolean
----------------------
Valid operations are:     "enable", "focus", "check", "push"

The enable and focus work similar to the dialog's while push
you also specifies a boolean the make the button pushes down
or up(true = down, false = up).  This not only works with push-like
buttons, but also push buttons, the effect is pretty sick.

For check, you would use it with a checkbox or radio button, while
the boolean can be "true", "false", or "dontknow" where the true
will check it, false will uncheck it, dontknow will have a undetermined
state only if your button has a 3state like style.



set		text
----------------------
The text will equal to the text on the button











============================================
|
| Edit
|
============================================


Dialog Template Syntax
======================
edit
~edit


Attributes
======================
The following attributes are valid for dialogs.

id, title, size, style, xstyle, bgcolor, font, fontcolor


id	single_word_string
----------------------
The id assigned for this control


title	text
----------------------
The default text to appear in the edit box.



size	unsigned_int	unsigned_int	unsigned_int	unsigned_int
----------------------
The size of the dialog, the first two specify its left top coordinate, while
the latter two will specify its width and height.



bgcolor		hex
----------------------
specifies the background color for this edit



font		text
----------------------
the text would specify the font face or the font type you want



fontcolor	hex
----------------------
the color for the font.



style	ored_string
----------------------
The following is a list of styles that you can apply to buttons.


esautohscroll
=-=-=-=-=-=
Automatically scrolls text to the right when the text you type reaches
the end of the visible edit box line.


esautovscroll
=-=-=-=-=-=
Automatically scrolls the text up on page when the user hit enter
on the last line


escenter
=-=-=-=-=-=
Centers text in multiline edit box


esleft
=-=-=-=-=-=
Left-aligns text.



esright
=-=-=-=-=-=
Right-aligns text.


eslowercase
=-=-=-=-=-=
All the characters the user typed will be lower-cased


esuppercase
=-=-=-=-=-=
All the characters the user typed will be upper-cased



esmultiline
=-=-=-=-=-=
Enable the edit box to accept multiple lines of text.


eswantreturn
=-=-=-=-=-=
Specify this so that the user can insert carriage return when hitting the enter
key in a multiline edit box, otherwise hitting the enter key will have the same
effect as pushing the default button.


esnohidesel
=-=-=-=-=-=
With this style, the text selection will be inverted even when the edit
box loses its focus.  Normally it would return to normal look when the edit
loses the focus.



esnumber
=-=-=-=-=-=
Allows only numbers to be entered into the edit box.



espassword
=-=-=-=-=-=
Will mask the edit box with '*' so user can safely enters the password.



esreadonly
=-=-=-=-=-=
This will make the edit control read-only so the user can't type anything
in it.




*Styles from the dialog that possibly work, you should probably experiment
with them


wshidden
=-=-=-=-=-=
This style will make your control to appear hidden when created.


wsdisable
=-=-=-=-=-=
The control will be disabled when first created.

wsborder
=-=-=-=-=-=
Creates a dialog with thin-lined border


wsthickborder
=-=-=-=-=-=
Creates a dialog with thick border


wsdlgframe
=-=-=-=-=-=
Yes another type of border, but you can't have title bar with this style.

wsgroup		
=-=-=-=-=-=
Allows your to group controls.  The group would have all the controls
starting with the first one that has this style and all the controls
in between until the next control that has this style.  You usually
group controls and add wstabstop to the first one to allow you to tab
between different groups, and use arrow keys to navigate in each group.
However, the wstabstop style doesn't current work.


wstabstop	(doesn't work)
=-=-=-=-=-=
Allows your to tab between any control that has this style.



xstyle
----------------------
please refer to the xstyle section in dialog.
One important note is that remember to put
the wsxclientedge if you aren't specifying
any color.  It'll make the edit to look what you usually
see in applications.  Or if you want it to look leet,
you can take out that xstyle, and it will look leet.



Events
======================
The following events are available for edit
(I hope they work as advertised, some might not)


init
----------------------
This is sent when edit is first created.  


destroy
----------------------
This is sent when edit is destroyed.



focus
----------------------
This event happens when edit gains keyboard focus.


blur
----------------------
This event happens when edit loses keyboard focus.
 

move
----------------------
This is sent after edit is moved.


size
----------------------
This is sent after edit is resized.


change
----------------------
This is sent after the content of the edit has changed.










Variables
======================
The available read-only variables are:

id, title, text, sel, size, style, xstyle, bgcolor, font, fontcolor

title or text : will be the current text inside the edit control.
sel: will be the text that the user is currently selecting.


everything else will not reflect the changes so far.



Actions
======================
Valid actions to do with !ckAction are:



show		boolean
----------------------
show follows a boolean to either show or hide the control.
You can also place "close" in place for the boolean, and
it will destroy the window, so no reference will be made to
that window



resize 		unsigned_int 	unsigned_int
----------------------
This actually means: 
resize 	width 	height.


move		unsigned_int	unsigned_int
----------------------
Moves the control to (unsigned_int, unsigned_int)


state		operation	boolean
----------------------
The operation can be "enable" or "focus", if it's enable, then the
following boolean means to either enable or disable it.  The boolean
has no effect if operation is "focus"


set		text
----------------------
The text will equal to the text inside the edit box



line		operation	int	text
----------------------	
Alright, this is something differnt from dialog and button.
The opearation can be: "add", "del", and "overwrite"
while the "int" here represents the line number to be operated on.
The text will be the one that's either added or overwrited.
The different operations are described below:

*Remember the line number is "0-based"

operation "add": 

This will allow you to append or insert text into the edit box.  
If the int is -1, it will let you append the "text"
you specify into the edit, if it's any other number that means
inserting the text into that line number(on applies in multiline edit).


operation "del":

This let's you to delete lines from the edit box specified by the line
number(starts from 0).  If the int is -1, this operation will delete
all the text inside the edit box.



operation "overwrite":

This is similar to add except that it will overwrite the line you specify.
If the int, or line number is -1, it will overwrite the whole thing.


Example:

!ckAction myDialog.myEdit.line add -1 "this text will be appended"
!ckAction myDialog.myEdit.line add 0  "this text will be inserted to the first line"
!ckAction myDialog.myEdit.line overwrite 3  "this text overwrite the fourth line"
!ckAction myDialog.myEdit.del -1

The last one will delete everything in the edit box







============================================
|
| Listbox
|
============================================


Dialog Template Syntax
======================
listbox
~listbox


Attributes
======================
The following attributes are valid for dialogs.

id, title, size, style, xstyle, bgcolor, font, fontcolor


id	single_word_string
----------------------
The id assigned for this control


title	text
----------------------
The default text to appear in the listbox.



size	unsigned_int	unsigned_int	unsigned_int	unsigned_int
----------------------
The size of the listbox, the first two specify its left top coordinate, while
the latter two will specify its width and height.



bgcolor		hex
----------------------
specifies the background color for this listbox



font		text
----------------------
the text would specify the font face or the font type you want



fontcolor	hex
----------------------
the color for the font.



style	ored_string
----------------------
The following is a list of styles that you can apply to listbox



lbsdisablenoscroll
=-=-=-=-=-=
Displays a disabled vertical scroll bar when box doesn't have
enough to scroll otherwise the scrollbar will be hidden.
You'll also need to specify wsvscroll to make it work i believe.



lbsextendedsel
=-=-=-=-=-=
The extended selecting method which allows you to use shift key and ctrl key
to select items like you do in file managers.



lbsmultiplesel
=-=-=-=-=-=
Allows multiple selection instead of single selection.


lbssort
=-=-=-=-=-=
This will sort the strings alphabetically



lbsstandard
=-=-=-=-=-=
This will sort strings and you will recieve notification when user
clicks or double clicks on the listbox, it also has borders.


lbsnotify
=-=-=-=-=-=
Set this style if you want to be able to recieve notification when
user clicks or double clicks on the list box.



*Styles from the dialog that possibly work, you should probably experiment
with them


wshidden
=-=-=-=-=-=
This style will make your control to appear hidden when created.


wsdisable
=-=-=-=-=-=
The control will be disabled when first created.

wsborder
=-=-=-=-=-=
Creates a dialog with thin-lined border


wsthickborder
=-=-=-=-=-=
Creates a dialog with thick border


wsdlgframe
=-=-=-=-=-=
Yes another type of border, but you can't have title bar with this style.

wsgroup		
=-=-=-=-=-=
Allows your to group controls.  The group would have all the controls
starting with the first one that has this style and all the controls
in between until the next control that has this style.  You usually
group controls and add wstabstop to the first one to allow you to tab
between different groups, and use arrow keys to navigate in each group.
However, the wstabstop style doesn't current work.


wstabstop	(doesn't work)
=-=-=-=-=-=
Allows your to tab between any control that has this style.



xstyle
----------------------
please refer to the xstyle section in dialog.



Events
======================
The following events are available for edit
(I hope they work as advertised, some might not)


init
----------------------
This is sent when edit is first created.  


destroy
----------------------
This is sent when edit is destroyed.



focus
----------------------
This event happens when edit gains keyboard focus.


blur
----------------------
This event happens when edit loses keyboard focus.
 

move
----------------------
This is sent after edit is moved.


size
----------------------
This is sent after edit is resized.


dblclick
----------------------
This event is fired when the user double clicks on the listbox,
though you'll need to specify the lbsnotify style.


selcancel
----------------------
This is sent after the user cancels a selection in the list box.


change
----------------------
This happens the the selection of hte list is about to change.





Variables
======================
The available read-only variables are:

id, title, sel, selpos, all, size, style, xstyle, bgcolor, font, fontcolor


title: i'm not sure what the title will do.


The three very exciting additions are the "selpos", "sel", and the "all" properties.

Their syntax are a little differernt from others.
They can be used just like normal variable "selpos" "sel" "all" or they work
as arrays like "selpos(1)" "sel(0)", "all(3)"  If sel only behaves like arrays
when you specify the multiple selection style.

Anyway, when referring them like arrays with the index number inside the parentheses,
they return the coresponding string in that index.  However, when you do not specify
anything, the text they will return will be in the format of:

for "sel" and "pos"
"string1:string2:string3:string4" where the string# are the strings that are either
selected or in the listbox depend whether you use "sel" or "all", the colon ":" is
the separator which you can specify in step.rc with:

ckDialogSeparator ":"

The separator is designed so it would be easier to be parsed with mzscript.


for "selpos" it's pretty much the same thing, except the strings will be replaces
by actual index numbers


If you don't understand what I am talking about try to use the LiteStep built-in
!alert bang to display the result by using something like:

!ckExecEvaluate !alert myDialog.myListBox.sel
!ckExecEvaluate !alert myDialog.myListBox.all
!ckExecEvaluate !alert myDialog.myListBox.all(2)
!ckExecEvaluate	!alert myDialog.myListBox.selpos
!ckExecEvaluate	!alert myDialog.myListBox.selpos(1)



everything else will not reflect the changes so far.



Actions
======================
Valid actions to do with !ckAction are:



show		boolean
----------------------
show follows a boolean to either show or hide the control.
You can also place "close" in place for the boolean, and
it will destroy the window, so no reference will be made to
that window



resize 		unsigned_int 	unsigned_int
----------------------
This actually means: 
resize 	width 	height.


move		unsigned_int	unsigned_int
----------------------
Moves the control to (unsigned_int, unsigned_int)


state		operation	boolean
----------------------
The operation can be "enable" or "focus", if it's enable, then the
following boolean means to either enable or disable it.  The boolean
has no effect if operation is "focus"


set		text
----------------------
The text will equal to the text inside the edit box



line		operation	int	text
----------------------	
Alright, this is something differnt from dialog and button.
The opearation can be: "add", "del", and "overwrite"
while the "int" here represents the line number to be operated on.
The text will be the one that's either added or overwrited.
The different operations are described below:

*Remember the line number is "0-based"

operation "add": 

This will allow you to append or insert text entry into the listbox.  
If the int is -1, it will let you append the list with an item entry of "text"
you specify into the listbox, if it's any other number that means
inserting the text into that line number.


operation "del":

This let's you to delete items from the edit box specified by the line
number(starts from 0).  If the int is -1, this operation will delete
all the content inside the listbox



operation "overwrite":

This is similar to add except that it will overwrite the line you specify.
If the int, or line number is -1, it will overwrite the whole thing.

 






============================================
|
| Combobox
|
============================================




Dialog Template Syntax
======================
combobox
~combobox


Attributes
======================
The following attributes are valid for dialogs.

id, title, size, style, xstyle, selcolor, selfontcolor, bgcolor, font, fontcolor, sel

*selcolor, selfontcolor are new, everything else is pretty much the same as before

*must specify this style, cbownerdraw, if you want the colors to work


id	single_word_string
----------------------
The id assigned for this control


title	text
----------------------
The default text to appear in the combobox.



size	unsigned_int	unsigned_int	unsigned_int	unsigned_int
----------------------
The size of the combobox, the first two specify its left top coordinate, while
the latter two will specify its width and height.


selcolor	hex
----------------------
The selcolor would be the highlight color when the user selects an entry.



selfontcolor	hex
----------------------
The selfontcolor will be the font color when the user selects an entry,
specify a differnt color than fontcolor to create an inverted effect.



bgcolor		hex
----------------------
specifies the background color for this combobox



font		text
----------------------
the text would specify the font face or the font type you want



fontcolor	hex
----------------------
the color for the font.



style	ored_string
----------------------
The following is a list of styles that you can apply to combobox



cbsautohscroll
=-=-=-=-=-=
automatically scrolls the text in the edit control when the user types somethign
at the end of the line.


cbsdisablenoscroll
=-=-=-=-=-=
shows disabled vertical scroll bar in the listbox of the combobox when there are
not enough items it in.



cbsdropdown
=-=-=-=-=-=
similar to cbssimple except that the listbox is not displyed until the user selects
the open icon next to the edit control



cbsdropdownlist
=-=-=-=-=-=
similar to cbsdropdown except the edit box is replaced by a static text control.




cbslowercase
=-=-=-=-=-=
convert everything to lowercase in the edit box.



cbsuppercase
=-=-=-=-=-=
convert everything to uppercase in the edit box.




cbssimple
=-=-=-=-=-=
displays the listbox at all times.



cbssort
=-=-=-=-=-=
sorts the items in the listbox



cbownerdraw
=-=-=-=-=-=
*This must be specified if you want the color you specified to show up




*Styles from the dialog that possibly work, you should probably experiment
with them


wshidden
=-=-=-=-=-=
This style will make your control to appear hidden when created.


wsdisable
=-=-=-=-=-=
The control will be disabled when first created.

wsborder
=-=-=-=-=-=
Creates a dialog with thin-lined border


wsthickborder
=-=-=-=-=-=
Creates a dialog with thick border


wsdlgframe
=-=-=-=-=-=
Yes another type of border, but you can't have title bar with this style.

wsgroup		
=-=-=-=-=-=
Allows your to group controls.  The group would have all the controls
starting with the first one that has this style and all the controls
in between until the next control that has this style.  You usually
group controls and add wstabstop to the first one to allow you to tab
between different groups, and use arrow keys to navigate in each group.
However, the wstabstop style doesn't current work.


wstabstop	(doesn't work)
=-=-=-=-=-=
Allows your to tab between any control that has this style.



xstyle
----------------------
please refer to the xstyle section in dialog.



Events
======================
The following events are available for edit
(I hope they work as advertised, some might not)


init
----------------------
This is sent when edit is first created.  


destroy
----------------------
This is sent when edit is destroyed.



focus
----------------------
This event happens when edit gains keyboard focus.


blur
----------------------
This event happens when edit loses keyboard focus.
 

move
----------------------
This is sent after edit is moved.


size
----------------------
This is sent after edit is resized.



dblclick
----------------------
This event is fired when the user double clicks on the listbox,
though you'll need to specify the lbsnotify style.


closeup
----------------------
This is sent when the list box of the combo box is closed.


dropdown
----------------------
This is sent when then list box of the combo box is about to be visible



selchange
----------------------
This is sent when the selection of the listbox of the combobox is about to change
due ot user clicking or arrow key selecting.



selendcancel
----------------------
This is sent when the user selects an item, but then selects another control or close
the dialog.



selendok
----------------------
This is sent when the user successfully selects an item.



selcancel
----------------------
This is sent after the user cancels a selection in the list box.


change
----------------------
This happens when the user has changed the content of the edit box.
(i'm not too sure about this one)





Variables
======================
The available read-only variables are:

id, title, edit, sel, selpos, all, size, style, xstyle, bgcolor, font, fontcolor


title and edit: they should return the text that is inside the edit box


The syntax for sel, and selpos are a little different while the syntax for all
is the same.  Since you can only have single selection in combobox, the sel, and
selpos returned will be only one string or one number.



everything else will not reflect the changes so far.



Actions
======================
Valid actions to do with !ckAction are:



show		boolean
----------------------
show follows a boolean to either show or hide the control.
You can also place "close" in place for the boolean, and
it will destroy the window, so no reference will be made to
that window


resize 		unsigned_int 	unsigned_int
----------------------
This actually means: 
resize 	width 	height.


move		unsigned_int	unsigned_int
----------------------
Moves the control to (unsigned_int, unsigned_int)


state		operation	boolean
----------------------
The operation can be "enable" or "focus", if it's enable, then the
following boolean means to either enable or disable it.  The boolean
has no effect if operation is "focus"


set		text
----------------------
The text will equal to the text inside the edit box



line		operation	int	text
----------------------	
Alright, this is something differnt from dialog and button.
The opearation can be: "add", "del", and "overwrite"
while the "int" here represents the line number to be operated on.
The text will be the one that's either added or overwrited.
The different operations are described below:

*Remember the line number is "0-based"

operation "add": 

This will allow you to append or insert text entry into the listbox.  
If the int is -1, it will let you append the list with an item entry of "text"
you specify into the listbox, if it's any other number that means
inserting the text into that line number.


operation "del":

This let's you to delete items from the edit box specified by the line
number(starts from 0).  If the int is -1, this operation will delete
all the content inside the listbox



operation "overwrite":

This is similar to add except that it will overwrite the line you specify.
If the int, or line number is -1, it will overwrite the whole thing.

 






======================
|
| Static
|
======================


Dialog Template Syntax
======================
static
~static


The static is very useful as it allows you to either put a text label on your
dialog or you can even put bitmaps in it.  This can be utilized to simulate 
buttons, as that buttons don't allow you to put bitmaps or icons right now.




Attributes
======================
The following attributes are valid for dialogs.

id, title, size, style, xstyle, icon, bitmap, bgcolor, font, fontcolor


id	single_word_string
----------------------
The id assigned for this control


title	text
----------------------
The window title the dialog will have when created.



size	unsigned_int	unsigned_int	unsigned_int	unsigned_int
----------------------
The size of the dialog, the first two specify its left top coordinate, while
the latter two will specify its width and height.



bitmap		text
----------------------
the text would be the path to the bitmap, remember to use double backslash for the path!



bgcolor		hex
----------------------
specifies the background color for this dialog



font		text
----------------------
the text would specify the font face or the font type you want



fontcolor	hex
----------------------
the color for the font.




style	ored_string
----------------------
The following is a list of styles that you can apply to dialogs, though
most of them are not limited to dialogs, such as wshidden, wsdisable, wsgroup,
wstabstop, and etc.


*The styles for static control havent' been fully tested


ssbitmap
=-=-=-=-=-=
This style must be specified in order for your bitmap to showup,
and when this is specified, you CANNOT have anything specified for your title.
(I think, though you are welcome to try it at your own risk)



ssblackframe
=-=-=-=-=-=
Specifies the frame to be drawn in the same color as the window frames. 
This color is black in the default Windows color scheme.



ssblackrect
=-=-=-=-=-=
Specifies the rectangle to be filled with the current window frame color.


sscenter
=-=-=-=-=-=
Centers the text


sscenterimage
=-=-=-=-=-=
Centerst the image


ssgrayframe
=-=-=-=-=-=
Gives you the same color as the screen's background, the default window background 
color is gray.


ssgrayrect
=-=-=-=-=-=
Specifies a rectangle to be filled with that color.



ssleft
=-=-=-=-=-=
Left-aligns the text.


ssleftnowordwrap
=-=-=-=-=-=
Left-algins and no wrapping.


ssnoprefix
=-=-=-=-=-=
Prevent the character '&' being interpreted as accenting the next character


ssright
=-=-=-=-=-=
Right-aligns the text.



sssimple
=-=-=-=-=-=
Specifies a simple rectangle and displays a single line of left-aligned text in the rectangle. 
The text line cannot be shortened or altered in any way.
(This style is not recommended if you use colors or anything)


sswhiteframe
=-=-=-=-=-=
Specifies the reactangle to be drawn as the same color as windows backgrounds, the default
window color scheme for this is white.


sswhiterect
=-=-=-=-=-=
Fills the rectangle with the windows background color same as above.



ssnotify
=-=-=-=-=-=
If you want to be able to prcoess click and dblclick events, you'll need to specify this one.




*Styles from the dialog that possibly work, you should probably experiment
with them


wshidden
=-=-=-=-=-=
This style will make your control to appear hidden when created.


wsdisable
=-=-=-=-=-=
The control will be disabled when first created.

wsborder
=-=-=-=-=-=
Creates a dialog with thin-lined border


wsthickborder
=-=-=-=-=-=
Creates a dialog with thick border


wsdlgframe
=-=-=-=-=-=
Yes another type of border, but you can't have title bar with this style.

wsgroup		
=-=-=-=-=-=
Allows your to group controls.  The group would have all the controls
starting with the first one that has this style and all the controls
in between until the next control that has this style.  You usually
group controls and add wstabstop to the first one to allow you to tab
between different groups, and use arrow keys to navigate in each group.
However, the wstabstop style doesn't current work.


wstabstop	(doesn't work)
=-=-=-=-=-=
Allows your to tab between any control that has this style.



xstyle
----------------------
please refer to the xstyle section in dialog.
















Events
======================
The following events are available for dialog

init
----------------------
This is sent when dialog is first created.  Be careful that at this time
only the dialog is created and not any the controls inside the dialog.



destroy
----------------------
This is sent when dialog is destroyed.



focus
----------------------
This event happens when dialog gains keyboard focus.




blur
----------------------
This event happens when dialog loses keyboard focus.
 


move
----------------------
This is sent after dialog is moved.




size
----------------------
This is sent after dialog is resized.


click
----------------------
This event is triggered when the user clicks on the static control.
You must have the ssnotify style in order for this to work.



dblclick
----------------------
This event is triggered when the user double clicks on the static control.
You must have the ssnotify style in order for this to work.



disable
----------------------
This event is triggered when the static control is disabled.



enable
----------------------
This event is triggered when the static control is enabled.













Variables
======================
The available read-only variables are:

id, title, size, style, xstyle, icon, bgcolor, font, fontcolor

title: 	will be the current title instead of the one specified in
the template if the title has changed since creation.

size: 	will be in the same format you specify in your template,
it too will reflect the new changes.

everything else will not reflect the changes so far.



Actions
======================
Valid actions to do with !ckAction are:


show		boolean
----------------------
show follows a boolean to either show or hide the control.
You can also place "close" in place for the boolean, and
it will destroy the window, so no reference will be made to
that window



resize 		unsigned_int 	unsigned_int
----------------------
This actually means: 
resize 	width 	height.


move		unsigned_int	unsigned_int
----------------------
Moves the control to (unsigned_int, unsigned_int)




state		operation	boolean
----------------------
The operation can be "enable" or "focus", if it's enable, then the
following boolean means to either enable or disable it.  The boolean
has no effect if operation is "focus"



set		text
----------------------
The text will equal to the new window title you want to set.



setui		bitmap		text
----------------------
The text would equal to the path to the file of the bitmap.  
Remember to have double backslash instead of single.
You must be logged in to leave a comment.
Website by 2008 - uses Silk icons