STRU - Lists and modifies the structure of the dbfs files

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by esgici »

Pablo César wrote: see you Turkish file in line 121, it is missing last quote.
OK. Added.
Turkish.zip
Last quote added at 121. line.
(1.62 KiB) Downloaded 197 times
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

STRU - Lists and modifies the structure of the dbfs file

Post by Pablo César »

Esgici wrote:OK. Added
Thank you Mr. Esgici. Sorry but I have to bother you again with some extra translations for turkish translations.

Now new release with selective languages, language's file in the path and RDD as fixed default or by user selective option.

Mr. Esgici, I have took grand part of your code source and I made some adjustments. I hope you enjoy all improvements made.

<Attached file removed, see last message with now release>
Last edited by Pablo César on Tue Sep 11, 2012 1:10 pm, edited 2 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by mol »

Hi!
I've created Polish.lng, but I have a few comments:
1. Polish national characters are different in text and graphics mode, so it would be better to separate text/graphical messages.
2. It's impossible to create CLIP.PRG
3. You can embed images directly in the EXE file, so program will be more mobile.

Regards, Marek
Attachments
polish.zip
(1.76 KiB) Downloaded 194 times
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by esgici »

Ola Pablo
Pablo César wrote:...some extra translations...
Applied to Turkish.lng and attached :)
Pablo César wrote:Now new release with selective languages, language's file in the path and RDD as fixed default or by user selective option.
With this improvement STRU has been more useful, thanks :)
Pablo César wrote:I hope you enjoy all improvements made.
Sure and with great pleasure; separate thanks for this:)

Everything is OK, but a little point : do you like if I talk to you with "Mr." or "Sr." ?
Turkish.zip
Turkish language file to STRU at 20121011
(1.67 KiB) Downloaded 204 times
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

STRU - Lists and modifies the structure of the dbfs file

Post by Pablo César »

mol (Marek) wrote:I've created Polish.lng
Thank you, Marek !
mol (Marek) wrote:1. Polish national characters are different in text and graphics mode, so it would be better to separate text/graphical messages.
In this case (for console module), we can manage to considere same name but different extension file. What extension name, do you suggest ? ".TLG" (Text Language) ?
mol (Marek) wrote:2. It's impossible to create CLIP.PRG
At prompt command, it was not possible, but now is ok (corrected and is updated in Stru.rar file). Thanks Marek.
mol (Marek) wrote:3. You can embed images directly in the EXE file, so program will be more mobile.
I thought images were embedded already in the EXE file. Sorry, I do not know what you means. Tell me how program could be more mobile, in case not using of .rc file ?
Esgici wrote:Applied to Turkish.lng and attached
Thank you Esgici, but please note that there are 132 items in your Turkish.Lng file, one is missing. Could you complete it, if you don't mind ?
Esgici wrote:With this improvement STRU has been more useful, thanks
I'm glad to know that you liked !
Esgici wrote:but a little point : do you like if I talk to you with "Mr." or "Sr." ?
Sorry, I use pronomes by question to be polite but I also understand this make feel distant in treatment sometimes. Sorry, I will try not to be used.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by esgici »

Pablo César wrote:...there are 132 items in your Turkish.Lng file, one is missing..
Sorry :oops:
Turkish.zip
Turkish language file with 133 item ( 20120911)
(1.67 KiB) Downloaded 214 times
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

STRU - Lists and modifies the structure of the dbfs file

Post by Pablo César »

esgici wrote:Sorry :oops:
No problem, my friend.

Now is updated with Turkish, Polish, Spanish, English and Portuguese.
Screen37.PNG
Screen37.PNG (55.99 KiB) Viewed 3557 times
You can write and press Enter at language field and will only accepts character in UPPER case and only if is part of any item of combobox. When language try to change at combobox will also check if file of language exists and will validate or not in case.
All these options could be accessed bu clicking at item of StatusBar.
Now I shall see others pendant items, with Marek regarding Polish language in console mode and for images into exe file.
Attachments
Stru.rar
(1.13 MiB) Downloaded 318 times
Last edited by Pablo César on Wed Sep 12, 2012 1:09 am, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

STRU - Lists and modifies the structure of the dbfs files

Post by Pablo César »

One question: Is it possible in HMG to change color of highlighted row in grid component ?

From:
Screen38.PNG
Screen38.PNG (20.19 KiB) Viewed 3939 times
To:
Screen39.PNG
Screen39.PNG (20.13 KiB) Viewed 3939 times
Would be very useful to get change color by any condition, this method calls more attention of users.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by mol »

I think it's only possible with MSPaint or PhotoShop :lol:

(Any other picture editors would be OK).

Joke of course,
regards,
Marek
User avatar
gfilatov
Posts: 1090
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by gfilatov »

Pablo César wrote:One question: Is it possible in HMG to change color of highlighted row in grid component ?
Hello Pablo,

It is possible with changing of the following internal variables:
* _HMG_SYSDATA [ 348 ] -> Grid Selected Row ForeColor (by cell navigation)
* _HMG_SYSDATA [ 349 ] -> Grid Selected Row BackColor (by cell navigation)
The working sample is below:

Code: Select all

/*
* HMG Grid Demo
* (c) 2005 Roberto Lopez
*/

#include "hmg.ch"

Function Main

Local aRows [20] [3]

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 640 ;
		HEIGHT 400 ;
		TITLE 'Mixed Data Type Grid Test' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'File'
				MENUITEM 'Set Item'	ACTION SetItem()
				MENUITEM 'Get Item'	ACTION GetItem()
			END POPUP
		END MENU

		aRows [1]	:= {113.12,date(),1,1 , .t. }
		aRows [2]	:= {123.12,date(),2,2 , .f. } 
		aRows [3]	:= {133.12,date(),3,3, .t. } 
		aRows [4]	:= {143.12,date(),1,4, .f. } 
		aRows [5]	:= {153.12,date(),2,5, .t. } 
		aRows [6]	:= {163.12,date(),3,6, .f. } 
		aRows [7]	:= {173.12,date(),1,7, .t. } 
		aRows [8]	:= {183.12,date(),2,8, .f. } 
		aRows [9]	:= {193.12,date(),3,9, .t. } 
		aRows [10]	:= {113.12,date(),1,10, .f. } 
		aRows [11]	:= {123.12,date(),2,11, .t. } 
		aRows [12]	:= {133.12,date(),3,12, .f. } 
		aRows [13]	:= {143.12,date(),1,13, .t. } 
		aRows [14]	:= {153.12,date(),2,14, .f. } 
		aRows [15]	:= {163.12,date(),3,15, .t. } 
		aRows [16]	:= {173.12,date(),1,16, .f. } 
		aRows [17]	:= {183.12,date(),2,17, .t. } 
		aRows [18]	:= {193.12,date(),3,18, .f. } 
		aRows [19]	:= {113.12,date(),1,19, .t. } 
		aRows [20]	:= {123.12,date(),2,20, .f. } 

_HMG_SYSDATA [ 348 ] := YELLOW
_HMG_SYSDATA [ 349 ] := RED
_HMG_SYSDATA [ 350 ] := YELLOW
_HMG_SYSDATA [ 351 ] := RED

		@ 10,10 GRID Grid_1 ;
		WIDTH 620 ;
		HEIGHT 330 ;
		HEADERS {'Column 1','Column 2','Column 3','Column 4','Column 5'} ;
		WIDTHS {140,140,140,140,140} ;
		ITEMS aRows ;
		EDIT ON CHANGE playbeep() ;
		COLUMNCONTROLS { {'TEXTBOX','NUMERIC','$ 999,999.99'} , {'DATEPICKER','DROPDOWN'} , {'COMBOBOX',{'One','Two','Three'}} , { 'SPINNER' , 1 , 20 } , { 'CHECKBOX' , 'Yes' , 'No' } } ;
		CELLNAVIGATION

	END WINDOW

Form_1.Grid_1.Value := { 1, 1 }

	CENTER WINDOW Form_1

	ACTIVATE WINDOW Form_1

Return

PROCEDURE SETITEM()

	Form_1.Grid_1.Item (2) := { 123.45 , date() , 2 , 10 , .T. }

RETURN

PROCEDURE GETITEM()
local a

	a := Form_1.Grid_1.Item (2) 

	msginfo ( str ( a [1] )				, '1' )
	msginfo ( dtoc ( a [2] )			, '2' )
	msginfo ( str( a [3] )				, '3' )
	msginfo ( str ( a [4] )				, '4' )
	msginfo ( if ( a [5] == .t. , '.t.' , '.f.' )	, '5' )

RETURN
Hope that helps. :idea:
Last edited by gfilatov on Wed Sep 12, 2012 12:30 pm, edited 1 time in total.
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
Post Reply