Grid
|
![]() ![]() ![]() |
Define and Properties |
CREATE GRID cName | (cVarName) | &(cExpression) | ||||||
[ ; OF cWindow | (cVarName) | &(cExpression) ] | ![]() | A reference to the Parent Window | ||||
[ ROW nRow ] | ![]() | Row position on container window in pixels coordinates | ||||
[ COL nCol ] | ![]() | Col position on container window in pixels coordinates | ||||
[ WIDTH nWidth ] | ![]() | The desired width size of the Control in pixels | ||||
[ HEIGHT nHeight ] | ![]() | The desired height size of the Control in pixels | ||||
[ ROWBOTTOM nRow ] | ![]() | Bottom Row position on container window in pixels coordinates. This property adjust the HEIGHT property according the ROW property. | ||||
[ COLRIGHT nCol ] | ![]() | Right Col position on container window in pixels coordinates. This property adjust the WIDTH property according the COL property. | ||||
[ ENABLED .T. | .F. ] | ![]() | Enable or Disable control | ||||
[ FONTNAME "cFontName" ] | ![]() | Font family for control text | ||||
[ FONTSIZE nPoints ] | ![]() | Font size for control text | ||||
[ FONTBOLD .T. | .F. ] | ![]() | Set Bold attribute to control text | ||||
[ FONTITALIC .T. | .F. ] | ![]() | Set Italic attribute to control text | ||||
[ FONTUNDERLINE .T. | .F. ] | ![]() | Set Underline attribute to control text | ||||
[ FONTSTRIKEOUT .T. | .F. ] | ![]() | Set Strikeout attribute to control text | ||||
[ FONTATTRDYNAMIC cFontAttrDynamic | {BFontAttrDynamic} ] | ![]() | Set font attributes cell dynamically by returning an ARRAY of font attributes (or NIL) from a CodeBlock. The CodeBlock receives two parameters: nRow and nCol. Warning, this property can cause performance problems if you codeblock is not efficient. ARRAY returned will be { "fontName" , "fontSize" , "fontBold" , "fontItalic" , "fontUnderline" , "fontStrikeOut" } If a attribute is NIL, global value is used. | ||||
[ FONTCOLOR {aFontColor} | aVarFontColor ] | ![]() | Set foreground color (text color) | ||||
[ BACKCOLOR {aBackColor} | aVarBackColor ] | ![]() | Set background color | ||||
[ FONTCOLORHEADER {aFontColor} | aVarFontColor ] | ![]() | Set foreground color (text color) for header of control (columns and rows headers) | ||||
[ BACKCOLORHEADER {aBackColor} | aVarBackColor ] | ![]() | Set background color for header of control (columns and rows headers) | ||||
[ FONTCOLORDYNAMIC cFontColorDynamic | {BFontColorDynamic} ] | ![]() | Set fontcolor cell dynamically by returning an STRING of RGB values (or NIL) from a CodeBlock. The CodeBlock receives two parameters: nRow and nCol. Warning, this property can cause performance problems if you codeblock is not efficient. | ||||
[ BACKCOLORDYNAMIC cBackColorDynamic | {BBackColorDynamic} ] | ![]() | Set backcolor cell dynamically by returning an STRING of RGB values (or NIL) from a CodeBlock. The CodeBlock receives two parameters: nRow and nCol. Warning, this property can cause performance problems if you codeblock is not efficient. | ||||
[ SELECTIONFONTCOLOR {aFontColor} | aVarFontColor ] | ![]() | Set font color for selected cell(s) | ||||
[ SELECTIONBACKCOLOR {aBackColor} | aVarBackColor ] | ![]() | Set background color for selected cell(s) | ||||
[ SELECTIONFONTCOLORDYNAMIC cFontColorDynamic | {BFontColorDynamic} ] | ![]() | Set fontcolor of selection cell dynamically by returning an STRING of RGB values (or NIL) from a CodeBlock. The CodeBlock receives two parameters: nRow and nCol. Warning, this property can cause performance problems if you codeblock is not efficient. | ||||
[ SELECTIONBACKCOLORDYNAMIC cBackColorDynamic | {BBackColorDynamic} ] | ![]() | Set backcolor of selection cell dynamically by returning an STRING of RGB values (or NIL) from a CodeBlock. The CodeBlock receives two parameters: nRow and nCol. Warning, this property can cause performance problems if you codeblock is not efficient. | ||||
[ ALTERNATINGROWCOLOR .T. | .F. ] | ![]() | This property holds whether to draw the background using alternating colors. | ||||
[ FONTNAMEHEADER "cFontName" ] | ![]() | Font family for text of columns header of control | ||||
[ FONTSIZEHEADER nPoints ] | ![]() | Font size for text of columns header of control | ||||
[ FONTBOLDHEADER .T. | .F. ] | ![]() | Set Bold attribute to text of columns header of control. Note, if NAVIGATEBY is set to "ROW", all columns are selected, so, depending on the desktop style, all header text will be set BOLD always | ||||
[ FONTITALICHEADER .T. | .F. ] | ![]() | Set Italic attribute to text of columns header of control | ||||
[ FONTUNDERLINEHEADER .T. | .F. ] | ![]() | Set Underline attribute to text of columns header of control | ||||
[ FONTSTRIKEOUTHEADER .T. | .F. ] | ![]() | Set Strikeout attribute to text of columns header of control | ||||
[ FONTNAMEHEADERROWS "cFontName" ] | ![]() | Font family for text of rows header of control | ||||
[ FONTSIZEHEADERROWS nPoints ] | ![]() | Font size for text of rows header of control | ||||
[ FONTBOLDHEADERROWS .T. | .F. ] | ![]() | Set Bold attribute to text of rows header of control. Note, if NAVIGATEBY is set to "COLUMN", all rows are selected, so, depending on the desktop style, all header text of rows will be set BOLD always. | ||||
[ FONTITALICHEADERROWS .T. | .F. ] | ![]() | Set Italic attribute to text of rows header of control | ||||
[ FONTUNDERLINEHEADERROWS .T. | .F. ] | ![]() | Set Underline attribute to text of rows header of control | ||||
[ FONTSTRIKEOUTHEADERROWS .T. | .F. ] | ![]() | Set Strikeout attribute to text of rows header of control | ||||
[ EDITINPLACEALL aColumnAllowEdit ] | ![]() | Allow user to edit the cell content for only same specific columns by pressing mouse double click. Look topic Browse and Grid Edit Inplace. Pressing | ||||
[ EDITINPLACEDISPLAYERROR .T. | .F. ] | ![]() | Allow marinas-gui to display an error message when the new value was not saved to the cell. Look topic Browse and Grid Edit Inplace. Pressing | ||||
[ EDITINPLACEDYNAMIC {bCellEvaluateBlock} ] | ![]() | Allow user to edit the cell content for an specific cell by checking the bCellEvaluateBlock to allow or not edit. Look topic Browse and Grid Edit Inplace. Pressing | ||||
[ EDITINPLACEGLOBAL .T. | .F. ] | ![]() | Allow user to edit the cell content by pressing mouse double click. Look topic Browse and Grid Edit Inplace. Pressing | ||||
[ EDITINPLACETRIGGERS enum QAbstractItemView::EditTrigger ] | ![]() | This property holds which actions will initiate item editing. Values: QAbstractItemView_NoEditTriggers (No editing possible.) QAbstractItemView_CurrentChanged (Editing start whenever current item changes.) QAbstractItemView_DoubleClicked (Editing starts when an item is double clicked.) QAbstractItemView_SelectedClicked (Editing starts when clicking on an already selected item) QAbstractItemView_EditKeyPressed (Editing starts when the platform edit key has been pressed over an item.) QAbstractItemView_AnyKeyPressed (Editing starts when any key is pressed over an item.) QAbstractItemView_AllEditTriggers (Editing starts for all above actions.) | ||||
[ EDITINPLACEVALIDALL aColumnCheckNewValue ] | ![]() | Allow user to evaluate the new cell content for only same specific columns to allow or not the new value. Look topic Browse and Grid Edit Inplace. Pressing | ||||
[ EDITINPLACEVALIDDYNAMIC {bCellEvaluateNewValue} ] | ![]() | Allow user to evaluate the new cell content for an specific cell by checking the bCellEvaluateBlock to allow or not the new value. Look topic Browse and Grid Edit Inplace. Pressing | ||||
[ ONEDITINPLACESAVE {bOnEditInplaceSaveBlock} ] | ![]() | Allow user to execute a BLOCK when user save the new value for a cell. Look topic Browse and Grid Edit Inplace. Pressing | ||||
[ EASYSKIP .T. | .F. ] | ![]() | Allow user to navigate in the control by pressing a key (like an index). Look topic Browse and Grid Key Trap. Pressing | ||||
[ CELL nRow , nCol [ , xValue ] ] | ![]() | Only for mg_Get() and mg_Set() functions. Get or Put a value into a cell of control. For mg_Get(), it don't need xValue and return the cell content. For mg_Put(), it need xValue and return .T. for successful or .F. for failed. | ||||
[ ITEM ] | ![]() | |||||
[ ITEMS ] | ![]() | |||||
[ ITEMCOUNT ] | ![]() | Only for mg_Get() function. It returns the total amount of rows in control | ||||
[ COLUMNHIDDEN nCol [ , .T. | .F. ] ] | ![]() | Only for mg_set() and mg_get(). That property HIDE or SHOW a column. At mg_set() mode, that property returns the previous value. | ||||
[ COLUMNHEADER ] | ![]() | |||||
[ COLUMNHEADERALL ] | ![]() | |||||
[ COLUMNALIGN ] | ![]() | |||||
[ COLUMNALIGNALL {aDataAlign} ] | ![]() | An array with aligns for each column in the grid | ||||
[ COLUMNALIGNHEADERALL {aHeadersAligns} ] | ![]() | An array with aligns for each header of column in the grid | ||||
[ COLUMNWIDTH nColumn [ , nWidth ] ] | ![]() | Only for mg_get()/mg_set() functions. This property get/set the with of a specific column | ||||
[ COLUMNWIDTHALL {aWidths} ] | ![]() | An array with widths for each column in the browse. Used at mg_get() function, this property returns an array with columns widths. | ||||
[ COLUMNCOUNT ] | ![]() | Only for mg_Get() function. It returns the total amount of columns in control | ||||
[ ROWHEIGHTALL nHeight ] | ![]() | Set/Get the height value for all rows. | ||||
[ ROWHIDDEN nRow [ , .T. | .F. ] ] | ![]() | Only for mg_set() and mg_get(). That property HIDE or SHOW a row. At mg_set() mode, that property returns the previous value. | ||||
[ ROWLABELALL .T. | .F. ] | ![]() | Show/Hide the rows labels for grid (rows labels are numbers from 1 to "itemcount") | ||||
[ DISABLEEVENTS .T. | .F. ] | ![]() | This property set ON/OFF the internal triggers of control. If you set DISABLEEVENTS to .T., ONNAVIGATECELL, ONENTER and others events into control will not be executed until you set DISABLEEVENTS with .F. parameter | ||||
[ DISABLEUPDATE .T. | .F. ] | ![]() | This property set ON/OFF the display update of control. If you set DISABLEUPDATE to .T., changes into control will not be shown until you set DISABLEUPDATE with .F. parameter | ||||
[ NAVIGATEBY "ROW" | "COL" | "CELL" ] | ![]() | Select navigate mode | ||||
[ IMAGES aImages ] | ![]() | Images for colunm 1 (This is a compatibility property and in the future will be replaced) | ||||
[ IMAGESLEN ] | ![]() | Total images for column 1. Only mg_Get() function is allowed. (This is a compatibility property and in the future will be replaced) | ||||
[ TOOLTIP cToolTip ] | ![]() | Text for display into tooltip | ||||
[ NOTABSTOP .T. | .F. ] | ![]() | This property force that TAB key doesn't stop in this control | ||||
[ VALUE nValue ] | ![]() | Set or Get row position | ||||
[ VALUECOL nValue ] | ![]() | Set or Get column position | ||||
[ VISIBLE .T. | .F. ] | ![]() | Show or hide control (like methods SHOW and HIDE) | ||||
[ HASFOCUS ] | ![]() | Only for mg_Get() function. This property returns .T. if control has the application focus | ||||
[ CURSOR ] | ![]() | Change the cursor pointer shape for the control. Go to to learn more about it. | ||||
[ FORCEACTION .T. | .F. ] | ![]() | It force the execution of the actions defined by methods like ACTION, ONENTER, ONCLICK, ONDBLCLICK, etc. when NOTABSTOP property was set '.T.'. This property is useful when application focus is over a control when a VALID clause and it doesn't permit lostfocus. | ||||
[ PARENT cParentName ] | ![]() | Parent window for this widget | ||||
[ PARENTTYPE n/a ] | ![]() | Only for mg_get() function, this property returns the PARENT control type or "" if the parent was not set. | ||||
[ ONDBLCLICK cOnDblClick | {BOnDblClick} ] | ![]() | An action to be performed when user press double mouse click | ||||
[ ONENTER cOnEnter | {BOnEnter} ] | ![]() | An action to be performed when user press ENTER or RETURN keys. You can interrupt the ENTER key propagate to the control returning the __MG_KEY_NO_PROPAGATE constant, e.g. to disable ENTERTAB behavior. | ||||
[ ONGOTFOCUS cOnGotFocus | {BOnGotFocus} ] | ![]() | An action to be performed when control is focused | ||||
[ ONLOSTFOCUS cOnLostFocus | {BOnLostFocus} ] | ![]() | An action to be performed when control is lost focused | ||||
[ ONHEADERCLICKALL abOnHeaderClickAll | { {BOnHeaderClickAll} [ , {BOnHeaderClickAll} ... ] ] | ![]() | An action to be performed when user press CLICK over headers. Each array elemnet is a block corresponding with column position. | ||||
[ ONNAVIGATECELL cOnNavigateCell | {BOnNavigateCell} ] | ![]() | An action to be performed when user move the cell position by arrows or mouse | ||||
[ CONTEXTMENUSUPRESSED .T. | .F. ] | ![]() | Disable the display of the Context Menu of control. | ||||
[ CREATE CONTEXT MENU [ cName ] ] | ![]() | CONTEXT MENU for control | ||||
[ ......... ] | ![]() | You can see properties for this menu in CONTEXT MENU topic | ||||
[ END MENU ] | ![]() | |||||
END GRID |
Jump to Context Menu topic |
Methods |
ADDITEM | ![]() | ? | ||||
ADDCOLUMN | ![]() | ? | ||||
MODCOLUMN | ![]() | ? | ||||
COLUMNSAUTOFITH | ![]() | Set columns width to content | ||||
DELETEITEM nItem | ![]() | Delete item number nItem from control | ||||
DELETEALLITEMS | ![]() | Delete ALL items from control | ||||
HIDE | ![]() | This method HIDE the control | ||||
SHOW | ![]() | This method SHOW the control | ||||
HIDECOLUMN nCol | ![]() | That method HIDE a column. | ||||
HIDEROW nRow | ![]() | That method HIDE a row. | ||||
SHOWCOLUMN nCol | ![]() | That method SHOW a column. | ||||
SHOWROW nRow | ![]() | That method SHOW a row. | ||||
SKIP nStep | ![]() | This method skip nStep rows | ||||
UNSETCURSOR | ![]() | Reset the cursor pointer shape for the control to default (Qt_ArrowCursor). Go to to learn more about it. | ||||
REFRESH | ![]() | This method is used to refresh the control content. | ||||
RELEASE | ![]() | This method is used to destroy the control. | ||||
SETFOCUS | ![]() | This method put the program focus into control | ||||
ONDBLCLICK | ![]() | Execute ONDBLCLICK block coded in CREATE or seted by mg_Set | ||||
ONENTER | ![]() | Execute ONENTER block coded in CREATE or seted by mg_Set | ||||
ONHEADERCLICK | ![]() | Execute ONHEADERCLICK block coded in CREATE or seted by mg_Set | ||||
ONNAVIGATECELL | ![]() | Execute ONNAVIGATECELL block coded in CREATE or seted by mg_Set | ||||
ONGOTFOCUS | ![]() | Execute ONGOTFOCUS block coded in CREATE or seted by mg_Set | ||||
ONLOSTFOCUS | ![]() | Execute ONLOSTFOCUS block coded in CREATE or seted by mg_Set |
Marinas-GUI Version 03.06 and Marinas-IDE Version 05.06 and LEX Files Version 02.06 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- last update: April 27 2017 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![]() A Harbour/QT framework to make multiplatform programs (©) Copyright 2009-2017 by Fernando Santolin (aka CarozoDeQuilmes) CarozoDeQuilmes@gmail.com 2009-2017 Beta tester and full English translator: Bruno Luciani Bruno.Luciani@gmail.com 2014-2015 Final English corrector: David Worboys DavidWorboys@hotmail.com --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- www.marinas-gui.org |
|
![]() ![]() ![]() |