HMG 3.0.33

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

User avatar
Algernon
Posts: 57
Joined: Sat Mar 20, 2010 10:36 am
DBs Used: DBF
Location: Arucas, Gran Canaria, Canary Islands

Re: HMG 3.0.33

Post by Algernon »

Thanks Roberto

Lo probaré desde que pueda.

Muchas Gracias

Javier Suárez

La obra humana más bella es la de ser útil al prójimo. (Sófocles)
The most beautiful work of man is to be useful to others. (Sófocles)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.33

Post by Roberto Lopez »

Roberto Lopez wrote: Please, take a look at the following IDE GRID attached sample.
And please, let me know your experience. I want to solve any problem that arises and clarify any other question you have.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Czarny_Pijar
Posts: 172
Joined: Thu Mar 18, 2010 11:31 pm
Location: 19.2341 E 50.2267 N

Re: HMG 3.0.33

Post by Czarny_Pijar »

Roberto Lopez wrote:Please, take a look at the following IDE GRID attached sample.
Thank you, this is what I wanted to know. Knowledge of what is possible and what is not possible is certainly better than guesses. Here I have to quote what luisvasquezcl said:
luisvasquezcl wrote:Muchas veces no me detengo a pensar el por qué de las cosas... simplemente trato de avanzar.
Lo bueno es que te saliste del problema....
:) Thank you again.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.0.33

Post by esgici »

Roberto Lopez wrote: ?
Sorry for my bad English :(

Please forgot it

Best Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.33

Post by Roberto Lopez »

Czarny_Pijar wrote:
Roberto Lopez wrote:Please, take a look at the following IDE GRID attached sample.
Thank you, this is what I wanted to know. Knowledge of what is possible and what is not possible is certainly better than guesses. Here I have to quote what luisvasquezcl said:
luisvasquezcl wrote:Muchas veces no me detengo a pensar el por qué de las cosas... simplemente trato de avanzar.
Lo bueno es que te saliste del problema....
:) Thank you again.
In this case, the explanation is simple... very simple indeed.

Grid and Browse are different controls, so, they have different requirements :)

At the moment, Grid requires that the rowsource table be open at control definition.

Despite that, eventually, such requirement could change in future versions.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
luisvasquezcl
Posts: 1261
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: HMG 3.0.33

Post by luisvasquezcl »

Hi Roberto,
very good look ... great picture.
I knew I had a smile own stuff ...
Best regards,
Luis Vasquez.
User avatar
luisvasquezcl
Posts: 1261
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: HMG 3.0.33

Post by luisvasquezcl »

Hi Roberto,
very good look ... great picture.
I knew I had a smile own stuff ...
Best regards,
Luis Vasquez.
User avatar
gfilatov
Posts: 1100
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 3.0.33

Post by gfilatov »

Roberto Lopez wrote:- HMG 3.0.33 Changelog:

- Fixed: Grid 'ColumnWhen' property problems. Reported by Claudio.

...
Hello Roberto,

There is an other problem with Grid 'ColumnWhen' moving after HMG 3.0.31.

Please try to edit the first line of Grid by <Enter> key since the first cell in the sample below.
When you press Enter for exit from editing you'll move to 4th numeric cell but you should move to 2nd character editable cell.
It seems that there is a problem with CellValue property into ColumnWhen block :?:

Code: Select all

/*
* MiniGUI Virtual Column Grid Demo
*/

#include "minigui.ch"

PROCEDURE Main

Local aRows [20] [6]

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 640 ;
		HEIGHT 400 ;
		TITLE 'Virtual Column Grid Test' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'File'
				MENUITEM 'Exit'		ACTION ThisWindow.Release
			END POPUP
			DEFINE POPUP 'Actions'
				MENUITEM 'Append Row'	ACTION AppendRow( aRows )
				MENUITEM 'Delete Row'	ACTION DeleteRow( aRows )
			END POPUP
		END MENU

		aRows [1]	:= {'01','Simpson','Homer',5,10,5*10}
		aRows [2]	:= {'02','Mulder','Fox',24,32,24*32} 
		aRows [3]	:= {'03','Smart','Max',43,58,43*58} 
		aRows [4]	:= {'04','Grillo','Pepe',89,23,89*23} 
		aRows [5]	:= {'05','Kirk','James',34,73,34*73} 
		aRows [6]	:= {'06','Barriga','Carlos',39,54,39*54} 
		aRows [7]	:= {'07','Flanders','Ned',43,11,43*11} 
		aRows [8]	:= {'08','Smith','John',12,34,12*34} 
		aRows [9]	:= {'09','Pedemonti','Flavio',10,100,10*100} 
		aRows [10]	:= {'10','Gomez','Juan',58,32,58*32} 
		aRows [11]	:= {'11','Fernandez','Raul',32,43,32*43} 
		aRows [12]	:= {'12','Borges','Javier',26,30,26*30} 
		aRows [13]	:= {'13','Alvarez','Alberto',54,98,54*98} 
		aRows [14]	:= {'14','Gonzalez','Ambo',43,73,43*73} 
		aRows [15]	:= {'15','Batistuta','Gol',48,28,48*28} 
		aRows [16]	:= {'16','Vinazzi','Amigo',39,83,39*83} 
		aRows [17]	:= {'17','Pedemonti','Flavio',53,84,53*84} 
		aRows [18]	:= {'18','Samarbide','Armando',54,73,54*73} 
		aRows [19]	:= {'19','Pradon','Alejandra',12,45,12*45} 
		aRows [20]	:= {'20','Reyes','Monica',32,36,32*36} 

		@ 10,10 GRID Grid_1 ;
			WIDTH 612 ;
			HEIGHT 330 ;
			HEADERS { 'Code', 'Last Name', 'First Name', 'Quantity', 'Price', 'Cost' } ;
			WIDTHS {60,100,100,80,80,100} ;
			VIRTUAL ;
			ITEMCOUNT Len(aRows) ;
			ON QUERYDATA QueryTest(aRows) ;
			CELLNAVIGATION ;
			VALUE 1 ;
			EDIT ;
			COLUMNCONTROLS { ;
					{'TEXTBOX','CHARACTER', '999' } , ;
					{'TEXTBOX','CHARACTER', } , ;
					{'TEXTBOX','CHARACTER', } , ;
					{'TEXTBOX','NUMERIC', '9,999' } , ;
					{'TEXTBOX','NUMERIC', '999.99' } , ;
					{'TEXTBOX','NUMERIC', '9,999,999.99' } ;
					};
			COLUMNWHEN { ;
					{ || !Empty ( This.CellValue ) } , ;
					{ || This.CellValue >= 'M' } , ;
					{ || This.CellValue >= 'C' } , ;
					{ || ! Empty ( This.CellValue ) }, ;
					{ || ! Empty ( This.CellValue ) }, ;
					{ || Empty ( This.CellValue ) } ;
					} ;
			COLUMNVALID { { || SETVIRTUALITEM( aRows ) }, ;
					{ || SETVIRTUALITEM( aRows ) }, ;
					{ || SETVIRTUALITEM( aRows ) }, ;
					{ || SETVIRTUALITEM( aRows ) } , ;
					{ || SETVIRTUALITEM( aRows ) } , ;
					} ;
			JUSTIFY { GRID_JTFY_LEFT,;
				GRID_JTFY_RIGHT,;
				GRID_JTFY_RIGHT,;
				GRID_JTFY_RIGHT,;
				GRID_JTFY_RIGHT,;
				GRID_JTFY_RIGHT }

	END WINDOW

	CENTER WINDOW Form_1

	ACTIVATE WINDOW Form_1

Return

Procedure QueryTest( aArr )

	This.QueryData := aArr [This.QueryRowIndex][This.QueryColIndex]

Return

Function SETVIRTUALITEM( aArr )
Local nVal := This.CellValue
Local nCol := This.CellColIndex
Local nRow := This.CellRowIndex
Local lRet := .T.

	aArr [nRow] [nCol] := nVal
	if nCol > 3
		aArr [nRow] [6] := aArr [nRow] [iif(nCol==5, 4, 5)] * nVal
	else
		lRet := !Empty(nVal)
	endif

RETURN lRet

Procedure SaveData( aArr )

	BEGIN INI FILE "data.ini"
		SET SECTION "Data" ENTRY "Array" To aArr
	END INI

Return

Procedure AppendRow( aArr )

	Aadd( aArr, {'21','Reyes','Monica',1,1,1} )
	Form_1.Grid_1.ItemCount := Len(aArr)
	Form_1.Grid_1.Value := {Len(aArr), 1}

Return

Procedure DeleteRow( aArr )
Local nRow := Form_1.Grid_1.Value

	Adel( aArr, nRow[1] )
	Asize( aArr, Len(aArr)-1 )
	Form_1.Grid_1.ItemCount := Len(aArr)
	if nRow[1] > Len(aArr)
		Form_1.Grid_1.Value := {Len(aArr), 1}
	endif

Return
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.33

Post by Roberto Lopez »

gfilatov wrote:
Roberto Lopez wrote:- HMG 3.0.33 Changelog:

- Fixed: Grid 'ColumnWhen' property problems. Reported by Claudio.

...
Hello Roberto,

There is an other problem with Grid 'ColumnWhen' moving after HMG 3.0.31.
Thanks for the report.

I'll check it ASAP.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.33

Post by Roberto Lopez »

luisvasquezcl wrote:Hi Roberto,
very good look ... great picture.
I knew I had a smile own stuff ...
Best regards,
Luis Vasquez.
I test my smile daily in front of a mirror ;)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply