Function InputWindow()
Moderator: Rathinagiri
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Function InputWindow()
Excelente Pablo César,
Como dicen los japoneses "Usted ha hecho un gran trabajo!"
Muy útil para mi también!
Saludos
Como dicen los japoneses "Usted ha hecho un gran trabajo!"
Muy útil para mi también!
Saludos
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Function InputWindow()
Ahhh Javier ! Me hiciste reir... si no fuera el amor que tengo por lo que hago... me iria al Japón....
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
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Function InputWindow()
+1Pablo César wrote: Ahhh si no fuera el amor que tengo por lo que hago... me iria al Japón....
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Function InputWindow()
InputWIndow.prg has been upgraded. A little bug was found. Runtime error when at Demo4 and Grid_CheckBoxes demos when clicking in disable column (empty column, out of active grid).
And please, inform any bug if found any...
Thanks
And please, inform any bug if found any...
Thanks
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: Function InputWindow()
HI Pablo César
Demo4.exe supplied by you working Ok, But when we compile form source code supplied, there error as per screen shot
Demo4.exe supplied by you working Ok, But when we compile form source code supplied, there error as per screen shot
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Function InputWindow()
Hi Dave,bpd2000 wrote:Demo4.. // ..But when we compile form source code supplied, there error as per screen shot
Thanks to show your interest in it and report an error.
It's deficult to understand you by only display message without explaining or seeing the code for testing.
But I guess this happen in you HMG version (in your actual 3.4.0 version has not be patched, because no one was released yet) and in "About" column of your grid demo is being displayed with empties values.
Doesn't it ?
According your answer, please see below probabilities:
- The this error is probably regarding this:
This is one, is another one of my repeated request to HMGDT for allowing the EditBox at Grid for all types of Grids.
Code: Select all
Case XRES[1] == 'EDITBOX' If ":" $ xValue .and. File(xValue) cValue:=hb_MemoRead(xValue) ElseIf "\" $ xValue .and. File(GetCurrentFolder()+xValue) cValue:=hb_MemoRead(GetCurrentFolder()+xValue) ElseIf (!Empty(cDbf) .and. IsDataGridMemo( nIdx, nPos )) .or. xValue="<memo>" aFields:=(_HMG_SYSDATA [ 40 ] [ nIdx ] [ 11 ]) cValue:=(&cDbf->&(aFields[nPos])) Else cValue:=xValue Endif Aadd(aValues,cValue) Aadd(aFormats,64)
I've been asking this: in this other topic (please read carefully) and if you agreed with that or believe important, please give your support in that topic.
If this new implementation for grid will not approved. I mean to accept EditBox at any grids (for all type of grids), at least should it let grids in ColumnControls returning the cell contain string as it was definied at ITEMS. I said at least, just because we need this for workable EditBox in any Grids. Otherwise, InputWindow will be posible to edit texts thru EditBox for Grids when RowSource is defined, only. I repeat only !
This is an important demand. To let grids for cellvalue display when have been used EditBox in COLUMNCONTROLS !
- As I said, some runtime errors could happend due to unpatched version of HMG. Please read below in red:
Temporary use and implementation:
As we know InputWindow is not released yet with this improvements. So before InputWindow be upgraded in our HMG library, you will need to use it as follows:- Here in attached compressed file, there is an InputWindow.prg file which contains InputWindow2 function name. This name ends with "2", because the current InputWindow at HMG library is not upgraded yet (upto this moment at hmg 3.4.0 version).
- To use this new InputWindow2() you will need to include InputWindow.prg in your compilling. You will do by editing your main prg and add #include "InputWindow.prg" at line after of #include <hmg.ch>
- And remember to call the function like as InputWindow2() (with red "2") untill HMGDT will make this upgrade.
- Some changing will be done, updating this package. But always will be excluded the previous version. Always keeping updated the package file.
- Have been found some bugs in grid library in HMG. Those were been fixed by Claudio already. Probably will release a patch or a new HMG version. At meantime this not happen, some runtime errors could it be happen after your compilling.
Then you can not use EDITBOX at arrays in Grids, because this grid does not support EditBox...
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
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Function InputWindow()
Pablo,
Please make a change near line #59. When you move around the grid using keyboard and press enter it doesn't show the correct record for edition.
Also, you can get the column justification definition using _HMG_SYSDATA [ 37 ] [nIdx] You can right align the textboxes wherever required.
Please make a change near line #59. When you move around the grid using keyboard and press enter it doesn't show the correct record for edition.
Code: Select all
xGridValue := GetProperty(cForm,cGrid,"VALUE")
if ValType( xGridValue ) == 'A' // cell navigation on
nGridRow:= xGridValue[ 1 ]
else
nGridRow := xGridValue
endif
// nGridRow:=GetProperty(cForm,cGrid,"CellRowClicked") // doesn't work when grid row is changed by keyboard
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
Function InputWindow()
Hi Rathi,Rathinagiri wrote:When you move around the grid using keyboard and press enter it doesn't show the correct record for edition.
Also, you can get the column justification definition using _HMG_SYSDATA [ 37 ] [nIdx] You can right align the textboxes wherever required.
Thank you for your appointments. Regarding position when keyboards arrow be used. I will try to find a way. I didn't noted this and I believe this is an old and common question in grids.
Discuss asomething about this in the forum: http://hmgforum.com/viewtopic.php?p=7182#p7182
Forcolumn justification, duly noted. I'll include that.
Thank you !
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
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Function InputWindow()
I had given the modified code in the above post. You can replace the same for getting the correct row number whether selected by keyboard or mouse.
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
Function InputWindow()
Thank you Rathi,
I saw and it's already. I've have made mistake considerating by CellColClicked only.
I have corrected already previously when you have fixed it too.
The right way it's by Value, as you have appointed. But there are exceptions to be considered.
See the right code we would it be considered:
Exceptions are when is multiselect option and also need to differentiate when is with CELLNAVIGATION too.
Anyway I will make test again with ALL grids options located at SAMPLES and I will post the final version later.
Thank you for support !
I saw and it's already. I've have made mistake considerating by CellColClicked only.
I have corrected already previously when you have fixed it too.
The right way it's by Value, as you have appointed. But there are exceptions to be considered.
See the right code we would it be considered:
Code: Select all
aGridValue:=GetProperty(cForm,cGrid,"Value")
If cControlType="MULTIGRID"
If Len(aGridValue)=1
nGridRow:=aGridValue[1]
cTitle:="Record #"+AllTrim(Str(nGridRow))+" edition"
Else
nGridRow:=1
cTxt:=""
AEval( aGridValue, { | Arr,n | cTxt += AllTrim(Str(Arr))+If(n=Len(aGridValue),"",",") } )
cTitle:="Records #"+cTxt+" edition"
Endif
nGridCol:=1
Else
If ValType(aGridValue)="A"
nGridRow:=aGridValue[1]
nGridCol:=aGridValue[2]
Else
nGridRow:=aGridValue
nGridCol:=1
Endif
cTitle:="Record #"+AllTrim(Str(nGridRow))+" edition"
Endif
If nGridCol=0 // In case click out of active columns
Return {}
Endif
Anyway I will make test again with ALL grids options located at SAMPLES and I will post the final version later.
Thank you for support !
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