EuGrid 1.3.4

A Grid Control for Euphoria & Win32lib

© 2002-2008 Phil Russell

Contents


What is EuGrid?

EuGrid is a datagrid control for MS Windows, written entirely in the Euphoria language and designed to be used with the win32lib windows programming library. It allows data to be displayed and edited in a spreadsheet-like format. It is intended to be useful for developing applications where two-dimensional 'record' data needs to be displayed e.g. in database applications.

Back to Top


What's New?

Release 1.3.4

This is a minor release:

Release 1.3.3

This is a minor release:

    (thanks to Craig Welch for the above)

Release 1.3.2

This is a minor release:

A new demo program keymsg.exw shows these in action...

Release 1.3.1

This is a minor release:

Release 1.3.0

Release 1.2.0

Release 1.1.1

This is a minor release:

Release 1.1.0

The main highlights:

Sortable Columns  

Columns can be sorted by right-clicking on column headers.  A new grid property EGW_ALLOW_COL_SORT turns this behaviour on or off.  Columns can be sorted programmatically by using the EGW_SortByColumn function.

Combobox Columns

Combobox columns can be created by specifying EGW_COMBO as the column type in EGW_AddColumn. Combobox columns can only be left-aligned, but can be made read-only in the same way as edit columns.  List items can be specified in two ways:

Checkbox Columns

Checkbox columns can be created by specifying EGW_CHECKBOX as the column type in EGW_AddColumn. The column will be displayed as checked if the value in the underlying datacolumn is anything other than False.  

Multiline Edit Columns

Editable cells (specified with a column type of EGW_EDIT) can be made multiline by setting the column property of EGW_COL_MULTILINE to True.

Improved Drawing

The grid now draws more efficiently with less flickering.  EuGrid can now be used with Don Phillips' xControls library without the need for a patched version of geometry.ew.

Improved Keyboard Navigation

The right and left arrow keys now move the focus to the next and previous cells respectively when the end or beginning of text in an editable cell is reached.  Text is now highlighted by default when an editable cell receives the focus.

Back to Top


Features of EuGrid

Back to Top


EuGrid Concepts

EuGrid is designed to display a dataset which is arranged into rows and columns. In Euphoria, this will typically be a sequence which contains a number of other sequences, all of which have the same number of elements. Data at the same offset in each of the contained sequences is considered to belong to the same column. Each individual contained sequence equates to a row. The value for a particular row and column is known as a cell.

EuGrid separates the display of data from the data itself. In practice this means that when you load a dataset into a grid, none of the rows and columns in the dataset will be displayed automatically. In order to show the data, it is necessary to define one or more grid columns which act as 'windows' to the underlying dataset and render the information visible. This approach has two advantages, namely:

This flexibility makes life slightly more complex. Developers using EuGrid need to make a clear distinction between dataset columns (which are not visible) and grid columns (which are). Accordingly, EuGrid functions are divided into those which affect the underlying dataset, and those which affect grid column attributes.

Back to Top


System Requirements

Programs which use EuGrid should include win32lib.ew and eugrid.ew.

The current version of EuGrid was written and tested using win32lib version 0.70.3 and Euphoria 3.1. It may work with earlier/later versions of either but I have not personally tried it.

The current version of EuGrid has been tested on Windows XP Home Edition.

Back to Top


Installing EuGrid

Copy eugrid.ew to your Euphoria include directory (recommended), or into the directory where your program is located.

Back to Top


Using EuGrid

Keyboard Navigation:

Up Arrow

Move up one row

Shift+Up Arrow

If in a combobox/dropdown list column, this will navigate up through the list items without having to drop the list down.

Alt+Up Arrow

If in a combobox/dropdown list column, this hides the list portion of the combobox/dropdown list if it is visible

Down Arrow

Move down one row

Shift+Down Arrow

If in a combobox/dropdown list column, this will navigate down through the list items without having to drop the list down.

Alt+Down Arrow

If in a combobox/dropdown list column, this displays the list portion of the combobox/dropdown list if it is not visible

Tab

Move to next cell

Right Arrow

If at end of text, moves to next cell

Shift+Tab

Move to previous cell

Left Arrow

If at beginning of text, moves to previous cell

Page Up

Display previous page of records

Page Down

Display next page of records

Control+Tab

Move to next child window

Shift+Control+Tab

Move to prior child window

F4

If in a combobox/dropdown list column, this will display or hide the list portion of the combobox/dropdown list.  

Mouse Navigation:

Vertical and horizontal scroll bars appear automatically if the grid is too large to be displayed in the window. Use these to move through rows and columns. The mousewheel can be also be used to move up and down through rows (not Windows 95).

Columns can be resized by clicking on the right hand margin of column headers and dragging the mouse to the required width. At present, visible columns can only be resized to a minimum width of about 5 pixels and cannot be made wider than the grid window width.

Columns can be sorted by right-clicking on column headers.  This displays a popup menu with options to sort the grid by the contents of the column in either ascending or descending order.

 Multiple rows can be selected by holding down either the shift or control key and clicking on the row headers for the required rows.  Holding the shift key down selects all rows between the clicked row and the last selected row.  Holding down the control key allows you to select multiple non-contiguous rows.

Back to Top


Demo Programs

Five demo programs are included:

simple.exw

Displays sample data in a grid. A second grid displays information on keyboard and mouse navigation

style.exw

Demonstrates a variety of EuGrid display options. This displays multiple grids in a tab window control

noah.exw

A sample database editing program using EuGrid and EDS

xctest.exw

Demo using EuGrid with Don Phillips' geometry manager (part of xControls library)

keymsg.exw Demo of the new keyboard messages introduced in 1.3.2

Back to Top


End User Licence Agreement

EuGrid consists of all files contained in eugridnnn.zip (where 'nnn' is the release number). EuGrid is freeware. EuGrid is released for private, public, and commercial use subject to these conditions:

  1. All distributions of EuGrid, modifications of EuGrid, or programs incorporating EuGrid shall include this End User License Agreement and the Disclaimer.
  2. You may freely copy and distribute EuGrid provided that you give due credit to me as author.
  3. You may modify EuGrid, and may freely distribute modifications if you give notice of the fact that you have made modifications and the general nature of these modifications.
  4. You may incorporate EuGrid, either as-is or modified, into a larger program. You may freely distribute such program subject to conditions 1, 2, and 3 if you distribute your program without charge.
  5. If you wish to sell a program which incorporates EuGrid, you may do so provided that your program has a purpose distinct from EuGrid's own purpose (the provision of a grid control for MS Windows) and that you comply with conditions 1, 2, and 3.

Back to Top


Disclaimer

EuGrid is released WITHOUT WARRANTY OF ANY KIND WHATSOEVER, whether express or implied. The author is not responsible for any damages arising from the use of this software, whether direct or indirect, incidental or consequential.

USE AT YOUR OWN RISK

Back to Top


Support

Basically there isn't any (officially), but feel free to post questions and bug reports to the Euphoria Forum.

I don't guarantee that I will respond swiftly/at all (I have a job & 3 kids!) but I hope to be as helpful as possible. It would be helpful when reporting bugs if a short program could be supplied which illustrates the problem.

Back to Top


Future Enhancements

I'm currently working on a ground-up rewrite (the near-mythical version 2.0) which may include some or all of the following, or at least make implementing them a bit easier:

If there is anything specific that you would like to request, please let me know via the Euphoria Forum.

Back to Top


Change History

Date

Version

Description

12th June 2002

1.0.0

Initial Release.

17th September 2002 

1.0.1

Interim release with support for tab windows and Don Phillips' geometry manager library 

23rd October 2002

1.1.0

  • Combobox columns
  • Checkbox columns
  • Edit columns can be multiline
  • Column sorting
  • Improved drawing (less flicker)
  • Improved keyboard support
  • 3D headers can be turned on or off

14th February 2003

1.1.1

Minor enhancement and bugfix

7th October 2003 1.2.0
  • Radiobutton cell
  • Change cell type for individual cells
  • Custom sort routines
  • Ability to disable columns and cells
  • Interim file eugrid_mem.e supplied to cope with expected future releases of win32lib
12th August 2004 1.3.0
  • Picture cells
  • Picture headers
  • Dropdown cells
  • Selection buttons
  • Multiple row selection
15th March 2005 1.3.1 Minor bugfixes
13th April 2005 1.3.2 New keypress messages
7th October 2006 1.3.3 Minor bugfixes. Improved documentation.
17th March 2008 1.3.4 Minor bugfixes. Win32lib 0.7.* compatibility.

Back to Top


 EuGrid Functions

EGW_AddColumn

Add a display column to the grid window

EGW_AddDataRow

Add a row to the underlying dataset

EGW_CreateGrid

Create a new grid window

EGW_CreateGridEx 

Create a new grid window with additional windows flags

EGW_DeleteColumn

Delete a display column from the grid window

EGW_DeleteDataRow

Delete a row from the underlying dataset

EGW_EnumColumns

Return a list of the currently defined display columns

EGW_GetCellFromPoint

Return the cell that contains a specified screen position

EGW_GetCellProperty

Get display property of an individual cell (only valid when processing a EGW_CELLFORMAT message)

EGW_GetColumnProperty

Get display property of a specified display column

EGW_GetCurrentCell

Get the cell which currently has the focus

EGW_GetCurrentCellValue Return the value of the currently active edit control

EGW_GetDataCellValue

Get the value for a particular cell in the underlying dataset

EGW_GetDataRow

Return a specified row in the underlying dataset

EGW_GetDataRowFlag

Return a row flag value for a specified row in the underlying dataset

EGW_GetGridProperty

Get a display property for the grid window

EGW_GetRowCount

Return the number of rows in the underlying dataset

EGW_IsRowVisible Is the specified row currently visible

EGW_LoadData

Load a dataset into a grid window

EGW_SaveCellData

Save any user changes from an editable cell into the underlying dataset

EGW_ScrollToCell

Set the focus to a specified cell and bring it into view

EGW_SetCellProperty

Set display property of an individual cell (only valid when processing a EGW_CELLFORMAT message)

EGW_SetColumnProperty

Set display property of a specified display column

EGW_SetCurrentCell

Set focus to a specified cell (without bringing it into view if it is not currently visible)

EGW_SetDataCellValue

Set the value for a particular cell in the underlying dataset

EGW_SetDataRowFlag

Set a row flag value for a specified row in the underlying dataset

EGW_SetGridProperty

Set a display property for the grid window

EGW_SortByColumn

Sort grid data by specifed column

EGW_UnloadData

Return the entire underlying dataset

Back to Top


EGW_AddColumn

Syntax

integer = EGW_AddColumn( integer id, sequence colName, integer colWidth, integer colPosition, integer colType, integer DataColumn)

Description

This function adds a visible column to the grid window. If successful the return value is the column_id of the column. If an error occurs the function returns -1.

Parameters

Back to Function List


EGW_AddDataRow 

Syntax

integer = EGW_AddDataRow ( integer id, sequence rowdata, atom insert_position )

Description

This function adds a single data row to the underlying dataset. If successful the return value is the row number of the inserted row. If an error occurs the function returns –1.

Parameters

Back to Function List


EGW_CreateGrid

Syntax

integer = EGW_CreateGrid( integer parent, integer x, integer y, integer width, integer height, integer visible)

Description

This function creates a new EuGrid grid control, and is analogous to the win32lib create command. If successful the function returns the win32lib control id. If unsuccessful a win32lib error will be displayed.

Parameters

Back to Function List


EGW_CreateGridEx 

Syntax

integer = EGW_CreateGridEx( integer parent, integer x, integer y, integer width, integer height, integer     visible, object ex_win_flags)

Description

This function creates a new EuGrid grid control and is identical to the EGW_CreateGrid function with the addition of a parameter for passing Windows extended style flags. If successful the function returns the win32lib control id. If unsuccessful a win32lib error will be displayed.

Parameters

Back to Function List


EGW_DeleteColumn

Syntax

boolean = EGW_DeleteColumn( integer id, integer col_id )

Description

This function deletes a specified visible column from a grid. If successful the function returns True.

Parameters

Back to Function List


EGW_DeleteDataRow

Syntax

integer = EGW_DeleteDataRow ( integer id, object row )

Description

This function deletes one or more specified rows from the underlying dataset. If successful the function returns the number of rows deleted. If unsuccessful the function returns zero.

Parameters

Back to Function List


EGW_EnumColumns

Syntax

object = EGW_EnumColumns (integer id)

Description

This function returns a sequence containing the column ids of the currently defined display columns for a specified grid. The column ids are returned in their current left-to-right display order. If an invalid grid id is supplied the function returns False.

Parameters

Back to Function List


EGW_GetCellFromPoint

Syntax

sequence = EGW_GetCellFromPoint( integer id, integer x, integer y)

Description

This function returns the cell id of the visible cell which contains the specified point (x and y values, in pixels, relative to the client area of the grid control). If a visible cell is found which contains the point, the function returns a 2-element sequence {row, column_id} identifying the cell. If no cell is found which contains the point, the return value is {-1, -1}

Parameters

Back to Function List


EGW_GetCellProperty

Syntax

object = EGW_GetCellProperty (integer id, integer index, integer property)

Description

This function returns the specified display property for an individual visible cell, prior to it being drawn on the screen. NB This function is only valid when processing an EGW_CELLFORMAT message. If called elsewhere it will always return False.

Parameters

Back to Function List


EGW_GetColumnProperty

Syntax

object = EGW_GetColumnProperty (integer id, integer col_id, integer property). If unsuccessful the function returns –1.

Description

This function returns the specified display property for a visible column

Parameters

Back to Function List


EGW_GetCurrentCell

Syntax

sequence = EGW_GetCurrentCell ( integer id )

Description

This function returns a 2-element sequence {row, column_id} identifying the cell which currently has the focus. If no cell currently has the focus then the return value is {-1, -1}

Parameters

Back to Function List


EGW_GetCurrentCellValue

Syntax

object = EGW_GetCurrentCellValue ( integer id )

Description

This function returns the text value of the currently active edit control.  If no edit control is currently active, the function returns zero.

Parameters

Back to Function List


EGW_GetDataCellValue

Syntax

object = EGW_GetDataCellValue ( integer id, atom row, atom datacol )

Description

This function returns an individual value from a specified row in the underlying dataset. If unsuccessful the function returns zero.

Parameters

Back to Function List


EGW_GetDataRow

Syntax

object = EGW_GetDataRow ( integer id, atom row )

Description

This function returns a sequence containing the specified row in the underlying dataset. If unsuccessful the function returns zero.

Parameters

Back to Function List


EGW_GetDataRowFlag

Syntax

boolean = EGW_GetDataRowFlag ( integer id, atom row, integer flag )

Description

This function returns the True or False value for a specified row flag for a specifed row in the underlying dataset. If unsuccessful the function returns -1.

Parameters

Back to Function List


EGW_GetGridProperty

Syntax

object = EGW_GetGridProperty (integer id, integer property)

Description

This function returns the specified display property for a specified grid control. If unsuccessful the function returns –1.

Parameters

Back to Function List


EGW_GetRowCount

Syntax

atom = EGW_GetRowCount ( integer id )

Description

This function returns the number of rows in the underlying dataset for a specified grid control. If unsuccessful the function returns -1.

Parameters

Back to Function List


EGW_IsRowVisible

Syntax

integer = EGW_IsRowVisible ( integer id, integer row )

Description

This function returns a number > 0 (specifically the index to the internal GridDraw sequence) if the specified row is currently visible, or 0 if it isn't.

Parameters

Back to Function List


EGW_LoadData

Syntax

integer = EGW_LoadData ( integer id, sequence data, integer insert_position )

Description

This function loads a dataset into a grid at a specified position. If successful the function returns the insert position. If unsuccessful the function returns -1.

Parameters

Back to Function List


EGW_SaveCellData

Syntax

boolean = EGW_SaveCellData( integer id, sequence cell )

Description

This function saves any pending user edit changes to the underlying dataset. If the value in the cell has been changed then the row flag EGW_ROW_EDITED is set to True. If successful the function returns True. NB user edit changes are saved automatically if a user changes the cell focus, but occasionally it is useful to be able to force a save.

Parameters

Back to Function List


EGW_ScrollToCell

Syntax

EGW_ScrollToCell ( integer id, integer row, integer col_id )

Description

This function sets the focus to the current cell, and if necessary scrolls the grid to bring the cell into view. If successful the function returns True, if unsuccessful the function returns False.

Parameters

Back to Function List


EGW_SetCellProperty

Syntax

boolean = EGW_SetCellProperty (integer id, integer index, integer property, object value)

Description

This function sets the specified display property for an individual visible cell, prior to it being drawn on the screen. If successful the function returns True, if unsuccessful the function returns False. NB This function is only valid when processing an EGW_CELLFORMAT message. If called elsewhere it will always return False.

Parameters

Back to Function List


EGW_SetColumnProperty

Syntax

boolean = EGW_SetColumnProperty (integer id, integer col_id, integer property, object value)

Description

This function sets the specified display property for a visible column. If successful the function returns True, if unsuccessful the function returns False.

Parameters

Back to Function List


EGW_SetCurrentCell

Syntax

boolean = EGW_SetCurrentCell ( integer id, atom row, atom col_id )

Description

This function sets the focus to the specified cell. If the function is successful it returns True.

Parameters

Back to Function List


EGW_SetDataCellValue

Syntax

boolean = EGW_SetDataCellValue ( integer id, atom row, atom datacol, object value )

Description

This function sets a value in the underlying dataset. If successful the function returns True.

Parameters

Back to Function List


EGW_SetDataRowFlag

Syntax

boolean = EGW_SetDataRowFlag ( integer id, atom row, integer flag, integer value )

Description

This function sets the True or False value for a specified row flag for a specifed row in the underlying dataset. If successful the function returns True.

Parameters

Back to Function List


EGW_SetGridProperty

Syntax

boolean = EGW_SetGridProperty (integer id, integer property, object value)

Description

This function sets the specified display property for a specified grid control. If successful the function returns True.

Parameters

Back to Function List


EGW_SortByColumn

Syntax

boolean = function EGW_SortByColumn( integer id, integer col_id, integer direction)

Description

This function sorts then entire underlying dataset by the contents of the specified column. If successful the function returns True.

Parameters

Back to Function List


EGW_UnLoadData

Syntax

object = EGW_UnloadData ( integer id )

Description

This function returns the entire underlying dataset as a sequence. If unsuccessful the function returns False.

Parameters

Back to Function List


EuGrid Messages

EGW_CELLCHANGE

This message is sent when a user tries to change the focus away from the current cell

  • wParam: The row with the focus
  • lParam: The column id with the focus

Returning a value of True for this message prevents the change of focus from occurring.

EGW_CELLEDIT

This message is sent when a user types a character into an editable cell.

  • wParam: The virtual key code of the entered character
  • lParam: The column id of the cell being edited

Returning a value of True for this message prevents the typed character from being displayed in the cell.

EGW_CELLFORMAT

This message is sent for each visible cell, just prior to it being drawn. Applications can trap this message and use the supplied parameters to alter the display attributes for an individual cell.

EGW_CLICK

This message is sent when a user clicks on the grid control with the left mouse button. DEPRECATED: use EGW_LEFTBUTTONDOWN instead

  • wParam: The row number of the clicked cell
  • lParam: The column id of the clicked cell

EGW_DOUBLECLICK

This message is sent when a user double-clicks on the grid control with the left mouse button.

  • wParam: The row number of the clicked cell
  • lParam: The column id of the clicked cell
EGW_KEYCHAR A copy of a WM_CHAR message sent to the grid.  Returning a non-zero value will prevent processing of the WM_CHAR message.
EGW_KEYDOWN A copy of a WM_KEYDOWN message sent to the grid.  Returning a non-zero value will prevent processing of the WM_KEYDOWN message.
EGW_KEYUP A copy of a WM_KEYUP message sent to the grid.  Returning a non-zero value will prevent processing of the WM_KEYUP message.

EGW_LASTCELLTAB

This message is sent when a user attempts to tab right beyond the last cell in the last row of the grid. By default, this will cause the focus to change to the next child control of the grid’s parent window. Applications can trap this message and automatically insert a new row, if required (see demo program noah.exw).

  • wParam: The row number of the cell being tabbed from
  • lParam: The column id of the cell being tabbed from

Returning a value of True for this message will prevent the default change of focus occurring.

EGW_LEFTBUTTONDOWN

This message is sent when a user depresses the left mouse button with the cursor on the grid control.  Use this instead of EGW_CLICK.

  • wParam: The row number of the clicked cell
  • lParam: The column id of the clicked cell

EGW_LEFTBUTTONUP

This message is sent when a user releases the left mouse button with the cursor on the grid control. In checkbox cells, this message is also sent when the user releases the space bar (which can be used instead of the mouse to change the value of a checkbox).

  • wParam: The row number of the clicked cell
  • lParam: The column id of the clicked cell

EGW_MOUSEMOVE

This message is sent instead of WM_MOUSEMOVE as Win32lib seems to suppress this message for button controls (EuGrid is based on an owner-draw button window).

EGW_RIGHTBUTTONDOWN 

This message is sent when a user depresses the right mouse button with the cursor on the grid control. 

  • wParam: The row number of the clicked cell
  • lParam: The column id of the clicked cell

EGW_RIGHTBUTTONUP 

This message is sent when a user releases the right mouse button with the cursor on the grid control.

  • wParam: The row number of the clicked cell
  • lParam: The column id of the clicked cell

EGW_SELECTBUTTONUP 

This message is sent when a user releases the left mouse button after having clicked on a selection button within a cell.  The message is only sent if the cursor is still within the button area of the pressed button.

  • wParam: The row number of the clicked cell
  • lParam: The column id of the clicked cell

EGW_ROWCHANGE

This message is sent when a user tries to change the focus away from the current cell, and the target cell is on a different row. This message is always preceded by a EGW_CELLCHANGE message.

  • wParam: The row with the focus
  • lParam: The column id with the focus

Returning a value of True for this message prevents the change of focus from occurring.

Back to Top


EuGrid Properties & Constants

EGW_ACTIVE_HEADERS

Whether or not to show 3D 'button' behaviour when row and column headers are clicked. Default = True.

EGW_ALLOW_COL_RESIZE

Whether or not column headers can be resized by the user. Default = True.

EGW_ALLOW_COL_SORT

Are columns user sortable. If True then right-clicking on a column header displays a popup menu with options to sort the grid by the contents of the column in ascending or descending order. Default = True.

EGW_ALLOW_SELECT_ALL  Allow select all rows by clicking on [0,0] (only applies if EGW_MULTIPLE is True (1))

EGW_ASCEND

Sort column in ascending order.

EGW_BACKGROUND_COLOR

The default background color property for cells in the grid. Can be any valid RGB color value.

EGW_BACKGROUND_COLOR_SELECT

The default background color property for highlighted cells in the grid. Can be any valid RGB color value.

EGW_BITMAP_ROP  Specifies the default raster operation for BitBlt operations when drawing picture cells and picture headers.  The default is SRCAND, but any valid value for the GDI BitBlt function can be used.

EGW_CELL_ALIGN 

The text alignment property for the cell. Can be EGW_CENTER, EGW_LEFT or EGW_RIGHT. Default = EGW_COL ALIGN.

EGW_CELL_BACKGROUND_COLOR

The background color for an individual cell. Can be any valid RGB color value.

EGW_CELL_BITMAP_ROP  Specifies the raster operation for BitBlt operations when drawing pictures in a cell.  The default is taken from EGW_COL_BITMAP_ROP.

EGW_CELL_BORDER

Whether or not to draw a border around the cell with the focus. Default = True. NB: This is a grid-level property, despite the name.

EGW_CELL_BORDER_COLOR

The color of the border drawn around the cell with the focus. Can be any valid RGB color value. NB: This is a grid-level property, despite the name.

EGW_CELL_COL_ID

The column id for an individual cell.

EGW_CELL_DATATYPE 

The datatype for a the cell. Can be EGW_CHAR or EGW_NUMBER. Default=EGW_COL_DATATYPE.

EGW_CELL_DISABLED 

Whether cell text is drawn as static text in a 'greyed-out' manner. Default = EGW_COL_DISABLED.

EGW_CELL_EDITABLE 

For an editable cell, whether or not the text in the edit window is protected against edit. NB: by contrast with EGW_CELL_DISABLED, this will still allow users to copy the contents of the cell. Default = EGW_COL_EDITABLE.

EGW_CELL_FONT

The windows font handle for an individual cell.

EGW_CELL_MAXCHARS 

For an editable cell, the maximum number of characters that can be entered. Default=EGW_COL_MAXCHARS.

EGW_CELL_MULTILINE 

For a cell, whether or not text should be displayed and edited as multiline text. Default = EGW_COL_MULTILINE.

EGW_CELL_NUMFORMAT 

The number format for a cell. This is used when converting atom values to text for display. Use format syntax as for the Euphoria printf function. Default = EGW_COL_NUMFORMAT.

EGW_CELL_ROW

The row number for an individual cell.

EGW_CELL_SHOW_LIST 

For EGW_COMBO or EGW_DROPDOWN cell types, this determines whether the dropdown list is displayed. Default=True

EGW_CELL_SELECTBUTTON  Does this cell have a selectbutton (True/False)
EGW_CELL_SELECTBUTTON_BITMAP  The default bitmap (bitmap handle OR filename) to display in the selection button in this cell.
EGW_CELL_SELECTBUTTON_HEIGHT  The height, in pixels, of the selection button in this cell. The default is taken from EGW_COL_SELECTBUTTON_HEIGHT.
EGW_CELL_SELECTBUTTON_TEXT  The text to draw on then selection button in this cell. NB this text is not drawn if a bitmap has been defined via EGW_CELL_SELECTBUTTON_BITMAP.
EGW_CELL_SELECTBUTTON_WIDTH  The width, in pixels, of then selection button in this cell. The default is taken from EGW_COL_SELECTBUTTON_WIDTH.

EGW_CELL_TEXT

The text or bitmap that will be displayed in an individual cell. For a bitmap, the reference can be a path name to a bitmap file, or a handle to a bitmap image.

EGW_CELL_TEXT_COLOR

The text color for an individual cell. Can be any valid RGB color value.

EGW_CELL_TYPE

The cell type for an individual cell. Can be EGW_EDIT, EGW_STATIC, EGW_COMBO, EGW_CHECKBOX, EGW_RADIOBUTTON, EGW_PICTURE or EGW_DROPDOWN

EGW_CENTER

Constant specifying center-aligned text.

EGW_CHAR

Constant specifying that a cell contains character (i.e. sequence) data

EGW_CHECKBOX 

Constant specifying a checkbox column.

EGW_COL_ALIGN

The text alignment property for a visible column. Can be EGW_CENTER, EGW_LEFT (the default) or EGW_RIGHT.

EGW_COL_BACKGROUND_COLOR

The background color property for a visible column. Can be any valid RGB color value.

EGW_COL_BITMAP_ROP  Specifies the raster operation for BitBlt operations when drawing picture cells and picture headers in a specified column.  The default is taken from EGW_BITMAP_ROP.

EGW_COL_DATACOL

The underlying data column for a visible column.

EGW_COL_DATATYPE

The datatype for a visible column. Can be EGW_CHAR or EGW_NUMBER.

EGW_COL_DISABLED 

If True (1), then this column is drawn as static text in a 'greyed-out' manner.  The specific color used is specified by the grid-level property EGW_TEXT_DISABLED_COLOR.

EGW_COL_EDITABLE

The editable property for a visible column with a column type of EGW_EDIT. Can be True or False. Default = True. Setting this property to False means that text can be selected and copied, but not altered.

EGW_COL_HEADER_BITMAP  The default bitmap (bitmap handle OR filename) to display in the column header

EGW_COL_HEADER_HEIGHT

The height of column headers, in pixels.

EGW_COL_LIST_DATACOL

For a combobox column, the data column which contains the list items to be displayed by the dropdown list for each row.  If the specified datacolumn contains a null sequence for a particular row then the values specified by EGW_COL_LISTVALUES are displayed instead.

EGW_COL_LISTVALUES

For a combobox column, a sequence containing the list items to be displayed by the dropdown list for this column.

EGW_COL_MAXCHARS

For an editable column, the maximum number of characters that can be entered. Default=0, no restriction on number of characters.

EGW_COL_MULTILINE

For an editable column, whether or not cells should be displayed and edited as multiline text. Default = False.

EGW_COL_NAME

The column name for a visible column. This is displayed in the column header.

EGW_COL_NUMFORMAT

The number format for a visible column. This is used when converting atom values to text for display. Use format syntax as for the Euphoria printf function.

EGW_COL_POSITION

The position of a visible column in the left-to-right display order.

EGW_COL_SELECTBUTTON  Do cells in this column have selectbuttons (True/False)
EGW_COL_SELECTBUTTON_BITMAP  The default bitmap (bitmap handle OR filename) to display in selection buttons in this column.
EGW_COL_SELECTBUTTON_HEIGHT  The height, in pixels, of selection buttons in this column. The default is taken from EGW_SELECTBUTTON_HEIGHT.
EGW_COL_SELECTBUTTON_TEXT  The text to draw on selection buttons in this column. NB this text is not drawn if a bitmap has been defined via EGW_COL_SELECTBUTTON_BITMAP.
EGW_COL_SELECTBUTTON_WIDTH  The width, in pixels, of selection buttons in this column. The default is taken from EGW_SELECTBUTTON_WIDTH.

EGW_COL_SORT_ROUTINE_ID 

The routine id of the sorting function to be used for sort requests on a particular column. If not specified then the sort routine specified at the grid level by EGW_SORT_ROUTINE_ID is used by default

EGW_COL_TEXT_COLOR

The text color for a visible column. Can be any valid RGB color value

EGW_COL_TYPE

The cell type for a visible column. Can be EGW_EDIT, EGW_STATIC, EGW_COMBO, EGW_CHECKBOX, EGW_RADIOBUTTON, EGW_PICTURE or EGW_DROPDOWN

EGW_COL_WIDTH

The current width, in pixels, of a visible column.

EGW_COMBO 

Constant specifying a combobox column.

EGW_DEFAULT

Constant specifying a default row header.

EGW_DESCEND

Sort column in descending order.

EGW_DROPDOWN 

Constant specifying a dropdown list column.

EGW_EDIT

Constant specifying an editable column.

EGW_False 

Use for functions requiring booleans (value=0)

EGW_FIRST

Constant specifying the beginning of the underlying dataset or list of visible columns

EGW_FONT

The windows font handle for the default font for the grid.

EGW_HEADER_BACKGROUND_COLOR

The background color of row and column headers. Can be any valid RGB color value.

EGW_HIGHLIGHT_TEXT

Grid property specifying whether text should be automatically highlighted when a user tabs into an editable cell. Default = False.

EGW_LAST

Constant specifying the end of the underlying dataset or list of visible columns.

EGW_LEFT

Constant specifying left-aligned text.

EGW_LINE_COLOR

The color of the grid lines. Can be any valid RGB color value.

EGW_MAX_ARROW_HEIGHT  The default current row indicator >> has been replaced with a filled triangle (or 'arrow', rather grandly here). This grid property allows you to specifiy the maximum height of the vertical side of the triangle.
EGW_MAX_CHECKBOX_HEIGHT  The maximum height (and width, more or less) for checkbox items.  This stops checkboxes being drawn with silly dimensions in tall rows.
EGW_MOUSE_CLICK_POSITION  The last position on the grid {x,y} where a left or right mouse button down or button up event occurred

EGW_NONE

Constant specifying no row selection in the grid.

EGW_NULL_GRID_COLOR

The default color property for empty space around cells in the grid. Can be any valid RGB color value

EGW_NUMBER

Constant specifying that a cell contains numeric (i.e atom) data.

EGW_NUMBER_FORMAT

The default number format for the grid. This is used when converting atom values to text for display. Use format syntax as for the Euphoria printf function

EGW_PICTURE 

Constant specifying a picture column or cell type.

EGW_RADIOBUTTON

Constant specifying a radiobutton column.

EGW_REPLACE

Constant specifying that data being added to the grid should replace the existing contents.

EGW_RIGHT

Constant specifying right-aligned text

EGW_ROW_EDITED

Row flag. If true then the row has been edited. Set automatically when a user navigates out of an edited cell. Can also be set programmatically.

EGW_ROW_HEADER_BITMAP  The default bitmap (bitmap handle OR filename) to display in row header
EGW_ROW_HEADER_BITMAP_DATACOL  The data column containing bitmap handle/filename to display in row header

EGW_ROW_HEADER_DATACOL

The column in the underlying dataset which contains the data to be displayed in the row header.

EGW_ROW_HEADER_WIDTH

The width, in pixels, of row headers.

EGW_ROW_HEIGHT

The height, in pixels, of data rows.

EGW_ROW_MARKDELETED

Row flag. For application use.

EGW_ROW_NEW

Row flag. For application use.

EGW_ROW_SELECT

Row selection property for the grid. Can be EGW_NONE (no row selection) or EGW_SINGLE (one row at a time can be selected).

EGW_ROW_SELECTED

Row flag. True if the row is currently selected (highlighted).

EGW_ROWNUM

Constant specifying that the row header should contain the row number.

EGW_SELECTBUTTON_HEIGHT  The default height, in pixels, of selection buttons in cells
EGW_SELECTBUTTON_WIDTH  The default width, in pixels, of selection buttons in cells

EGW_SINGLE

Constant specifying single-row selection in the grid.

EGW_SORT_ROUTINE_ID

The routine id of the sorting function to be used for column sorting requests in the grid. If not specified then the default Euphoria sort is used.

EGW_STATIC

Constant specifying a static text column.

EGW_TEXT_ALIGN

The default text alignment property for the grid. Can be EGW_CENTER, EGW_LEFT (the default) or EGW_RIGHT.

EGW_TEXT_COLOR

The default text color property for the grid. Can be any valid RGB color value.

EGW_TEXT_COLOR_SELECT

The default highlighted text color for the grid. Can be any valid RGB color value.

EGW_TEXT_DISABLED_COLOR

The text color used for drawing columns or cells which have the EGW_COL_DISABLED/EGW_CELL_DISABLED property set.

EGW_True 

Use for functions requiring booleans (value=1)

Back to Top


Win32lib Compatibility

** to be completed (one day) with list of EuGrid functions to use instead of base Win32lib functions.

Back to Top


Known Problems

** must surely be something here? 

Back to Top