GRID - COLUMNCONTROLS
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
GRID - COLUMNCONTROLS
Hi HDT (HMG Development Team),
Is it posible to add a new property for SPINNERs at GRID when is defined at COLUMNCONTROLS ?
For COLUMNCONTROLS:
We use to declare like this: aCtrl_06 := { 'SPINNER', 1, 20 }
The suggested is to accept fourth parameter, like this: aCtrl_06 := { 'SPINNER', 1, 20, 5 }
This is to make INCREMENT at spinning in Grids, it could be important and optional too.
For this propose, shall it be implemented at _HMG_PARSEGRIDCONTROLS function too (around line # 1352).
I would like to receive any return (if yes or not) in order to make facilities at InputWindow(), otherwise this option will be fixed to increment always be +1.
Thank you for you attention.
Is it posible to add a new property for SPINNERs at GRID when is defined at COLUMNCONTROLS ?
For COLUMNCONTROLS:
We use to declare like this: aCtrl_06 := { 'SPINNER', 1, 20 }
The suggested is to accept fourth parameter, like this: aCtrl_06 := { 'SPINNER', 1, 20, 5 }
This is to make INCREMENT at spinning in Grids, it could be important and optional too.
For this propose, shall it be implemented at _HMG_PARSEGRIDCONTROLS function too (around line # 1352).
I would like to receive any return (if yes or not) in order to make facilities at InputWindow(), otherwise this option will be fixed to increment always be +1.
Thank you for you attention.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: GRID - COLUMNCONTROLS
+1Pablo César wrote:Hi HDT (HMG Development Team),
Is it posible to add a new property for SPINNERs at GRID when is defined at COLUMNCONTROLS ?
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: GRID - COLUMNCONTROLS
Sure, we can do that Pablo.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
GRID - COLUMNCONTROLS
Thank you guys
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
GRID - COLUMNCONTROLS
Hi HDT (HMG Development Team) again,
Is it posible to add another new property for TEXTBOX at GRID when is defined at COLUMNCONTROLS ?
For COLUMNCONTROLS:
We use to declare like this:
Then we could make like this: aCtrl_10 := { 'TEXTBOX', "PASSWORD" }
This is new implementation will allow to put passwords at specific column of GRID and this is optional too.
For this propose, need to only correct at _HMG_GRIDINPLACEEDIT function in h_grid.prg (around line # 1072).
I rebuilded lib and realized a test in C:\hmg.3.4.0\SAMPLES\Controls\Grid\GRID_25\demo.prg, changing textbox:
The results was partial, for editing is displaying well as password:
But for navigating is not displaying as a password. I'll be need a help from HDT, probably Dr. Claudio could offer a solution. At least could be displayed something like this: <Password> (not showing its value).
I attached executable file for your appreciation:
I would like to know if this new property could be applied to HMG library if there is a way for different displaying at Grid
probably using lTrueData ?
If we got solution for this then I make facilities to InputWindow() in this new type.
Thank you for you attention more one time,
Is it posible to add another new property for TEXTBOX at GRID when is defined at COLUMNCONTROLS ?
For COLUMNCONTROLS:
We use to declare like this:
- aCtrl_07 := { 'TEXTBOX','CHARACTER' }
- aCtrl_08 := { 'TEXTBOX','DATE' }
- aCtrl_09 := { 'TEXTBOX','NUMERIC','99999999' }
Then we could make like this: aCtrl_10 := { 'TEXTBOX', "PASSWORD" }
This is new implementation will allow to put passwords at specific column of GRID and this is optional too.
For this propose, need to only correct at _HMG_GRIDINPLACEEDIT function in h_grid.prg (around line # 1072).
I rebuilded lib and realized a test in C:\hmg.3.4.0\SAMPLES\Controls\Grid\GRID_25\demo.prg, changing textbox:
The results was partial, for editing is displaying well as password:
But for navigating is not displaying as a password. I'll be need a help from HDT, probably Dr. Claudio could offer a solution. At least could be displayed something like this: <Password> (not showing its value).
I attached executable file for your appreciation:
I would like to know if this new property could be applied to HMG library if there is a way for different displaying at Grid
probably using lTrueData ?
If we got solution for this then I make facilities to InputWindow() in this new type.
Thank you for you attention more one time,
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
GRID - COLUMNCONTROLS
Hi friends,
Actually EDITBOX for ColumnControl only works for Grid in ROWSOURCE (with database) !!
And even not been a grid for ROWSOURCE doesn't accept any value !
To HDT: In order to work EDITBOX at any type, is it posible to fix _SetItem and _GetItem at h_controlmisc.prg as follows ?
This will allow to use EditBox when is also not RowSource.
Taking this opportunity to ask for more this feature also:
When EditBox at Grid, we could define independent files to be edited.
In the column we could put the file names (with path or not for current folder).
Then the system will make a previous checking, it can be interpreted if this strings are being compose a file name or simple string to be edited.
In the source code proposed, we change following at h_grid.prg:
This demo is working in static cell and also three different ways to define file name for edition.
See that files must be define stating with "\" or "C:\"...
Please remember to remove C:\TEMP_TEST folder and SubFolder where this demo will be executed.
Source file for HMG library is attached: Executable file for demo (New features): Executable file for demo (Old version, 3.3.1): I hope you enjoy it !
Actually EDITBOX for ColumnControl only works for Grid in ROWSOURCE (with database) !!
And even not been a grid for ROWSOURCE doesn't accept any value !
To HDT: In order to work EDITBOX at any type, is it posible to fix _SetItem and _GetItem at h_controlmisc.prg as follows ?
This will allow to use EditBox when is also not RowSource.
Taking this opportunity to ask for more this feature also:
When EditBox at Grid, we could define independent files to be edited.
In the column we could put the file names (with path or not for current folder).
Then the system will make a previous checking, it can be interpreted if this strings are being compose a file name or simple string to be edited.
In the source code proposed, we change following at h_grid.prg:
- New parameter for _HMG_GRIDINPLACEEDITOK procedure.
PROCEDURE _HMG_GRIDINPLACEEDITOK( IDX, CI, RI, AEC, ALABELS, CTYPE, CINPUTMASK, CFORMAT, CVA, aReturnValues, cValCell ) - Replace this code:
For this one:
Code: Select all
IF _HMG_SYSDATA [ 40 ] [ idx ] [ 9 ] == .F. _SetItem ( , , ri , aTemp , idx ) ENDIF
Code: Select all
IF _HMG_SYSDATA [ 40 ] [ idx ] [ 9 ] == .F. // Pablo on February, 2015 If AEC == 'EDITBOX' If ":" $ cValCell .and. File(cValCell) cTextFile:=cValCell ElseIf "\" $ cValCell .and. File(GetCurrentFolder()+cValCell) cTextFile:=GetCurrentFolder()+cValCell ElseIf V="<memo>" .or. IsDataGridMemo ( Idx, ci ) cTextFile:=GetDataGridCellData ( idx , .t. ) Else cTextFile:="" Endif If Empty(cTextFile) _SetItem ( , , ri , aTemp , idx ) Else hb_MemoWrit(cTextFile,aTemp[ci]) Endif ENDIF
Code: Select all
/*
* HMG Data-Bound Grid Demo
* (c) 2010 Roberto Lopez
*
* Revised by Pablo César Arrascaeta
* Added EditBox in static cell and files for edition
*
*/
#include <hmg.ch>
Function Main()
Local cCurrent_Folder:="\Current.txt"
Local cSub_Folder:=GetCurrentFolder()+"\SubFolder\SubFolder.txt"
Local cOther_Folder:="C:\TEMP_TEST\Other.txt"
CreateFolder(GetCurrentFolder()+"\SubFolder")
CreateFolder("C:\TEMP_TEST")
hb_MemoWrit(cCurrent_Folder,"EDIT TEXT 2")
hb_MemoWrit(cSub_Folder,"EDIT TEXT 3")
hb_MemoWrit(cOther_Folder,"EDIT TEXT 4")
SET CELLNAVIGATIONMODE EXCEL
DEFINE WINDOW SAMPLE at 0, 0 width 420 height 200 title 'Sample Cell Navigation Downwards...' main
define grid grid_1
row 10
col 10
width 380
height 150
widths { 100, 100, 120 }
headers { 'Sl.No.', 'Name', "Editor" }
cellnavigation .t.
columnwhen { {|| .t. }, {|| .t. } }
columncontrols { { 'TEXTBOX', 'NUMERIC', '999' }, { 'TEXTBOX', 'CHARACTER' }, {"EDITBOX"} }
allowedit .t.
items { { 1, 'A', "EDIT TEXT 1" }, { 2, 'B', cCurrent_Folder }, { 3, 'C', cSub_Folder }, { 4, 'D', cOther_Folder }, { 5, 'E', "EDIT TEXT 5" }, { 6, 'F', "EDIT TEXT 6" }, { 7, 'G', "EDIT TEXT 7" }, { 8, 'H', "EDIT TEXT 8" }, { 9, 'I', "EDIT TEXT 9" } }
end grid
END WINDOW
SAMPLE.center
SAMPLE.activate
RETURN
See that files must be define stating with "\" or "C:\"...
Please remember to remove C:\TEMP_TEST folder and SubFolder where this demo will be executed.
Source file for HMG library is attached: Executable file for demo (New features): Executable file for demo (Old version, 3.3.1): I hope you enjoy it !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: GRID - COLUMNCONTROLS
Done!Pablo César wrote:Hi HDT (HMG Development Team),
Is it posible to add a new property for SPINNERs at GRID when is defined at COLUMNCONTROLS ?
For COLUMNCONTROLS:
We use to declare like this: aCtrl_06 := { 'SPINNER', 1, 20 }
The suggested is to accept fourth parameter, like this: aCtrl_06 := { 'SPINNER', 1, 20, 5 }
This is to make INCREMENT at spinning in Grids, it could be important and optional too.
For this propose, shall it be implemented at _HMG_PARSEGRIDCONTROLS function too (around line # 1352).
I would like to receive any return (if yes or not) in order to make facilities at InputWindow(), otherwise this option will be fixed to increment always be +1.
Thank you for you attention.
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact: