Lookup Table
Moderator: Rathinagiri
Re: Lookup Table
I am not Master, I am a learner
I call only one person, "Master"
With best regards.
Sudip
I call only one person, "Master"
With best regards.
Sudip
With best regards,
Sudip
Sudip
Re: Lookup Table
Hi Tristan and all!
I think the code of Sudip fine and good thinking.
This is the my example when you look directly at the table for some field with F2 or directly type in field nid. You also can add a new record in TEST table and the new added to the field.
I hope this example will help You.
Otherwise, I use HMG and minigui ext. about 3 years and I am very pleased with what they can.
Regards,
Miras
I think the code of Sudip fine and good thinking.
This is the my example when you look directly at the table for some field with F2 or directly type in field nid. You also can add a new record in TEST table and the new added to the field.
I hope this example will help You.
Otherwise, I use HMG and minigui ext. about 3 years and I am very pleased with what they can.
Regards,
Miras
- Attachments
-
- TESTLUP.rar
- (5.61 KiB) Downloaded 387 times
Re: Lookup Table
Hello Miras,
Thanks a lot for sharing this excellent code. I am using Minigui (both Official and Ext) less than 1 year
I am really excited about it's power and simplicity
IMHO, your code is for HMG Extended (checking compile.bat file). It runs fine with Minigui Extended.
Then I modified compile.bat file for HMG Official and it compiled and ran , but I found problem when I pressed F2
With best regards.
Sudip
Thanks a lot for sharing this excellent code. I am using Minigui (both Official and Ext) less than 1 year
I am really excited about it's power and simplicity
IMHO, your code is for HMG Extended (checking compile.bat file). It runs fine with Minigui Extended.
Then I modified compile.bat file for HMG Official and it compiled and ran , but I found problem when I pressed F2
Code: Select all
Date:10.11.09 Time: 19:43:24
Error: Harbour MiniGUI 2.9.5 (2009.10.09)
Control: BroTESt Of FrmTest Not defined. Program Terminated
Called from SETPROPERTY(6373)
Called from NFINDCODE(437)
Called from (b)DATATABLE(174)
Called from _DOCONTROLEVENTPROCEDURE(4740)
Called from EVENTS(1399)
Called from SETWINDOWTEXT(0)
Called from _DEFINEMASKEDTEXTBOX(391)
Called from DATATABLE(174)
Called from OPENTEST(463)
Called from (b)EXAMPLE(87)
Called from _DOCONTROLEVENTPROCEDURE(4740)
Called from EVENTS(553)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4428)
Called from EXAMPLE(103)
Called from (b)MAIN(45)
Called from _DOCONTROLEVENTPROCEDURE(4740)
Called from EVENTS(1319)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4382)
Called from MAIN(59)
Sudip
Last edited by sudip on Tue Nov 10, 2009 2:25 pm, edited 2 times in total.
With best regards,
Sudip
Sudip
Re: Lookup Table
Hi Miras,
Thanks for example.
Regards,
Tristan
Thanks for example.
Regards,
Tristan
Re: Lookup Table
Hi All,
Where I can find accounting or inventory application that build with HMG ?
Thanks,
Tristan
Where I can find accounting or inventory application that build with HMG ?
Thanks,
Tristan
Re: Lookup Table
Hello Sudip,sudip wrote:...
IMHO, your code is for HMG Extended (checking compile.bat file). It runs fine with Minigui Extended.
Then I modified compile.bat file for HMG Official and it compiled and ran , but I found problem when I pressed F2
You are right
You should update the code for using this sample with the HMG Official
Code: Select all
...
PROCEDURE DataTable()
Public lAddrow := .F.
Public lInit := .F. // <-- added here
If .Not. IsWIndowActive ( FrmTest )
DEFINE WINDOW FrmTest ;
AT 0,0 ;
WIDTH 700 HEIGHT 650 ;
TITLE 'Test table' ;
ICON 'kotac' ;
CHILD NOSIZE NOMAXIMIZE ;
ON INIT {|| lInit := .T. } ; // <-- added here
ON RELEASE {|| lInit := .F. } // <-- added here
...
@ 1,100 TEXTBOX TBoxFind VALUE 1 HEIGHT 23 WIDTH 100 NUMERIC INPUTMASK '9999999999' RIGHTALIGN;
ON CHANGE iif(lInit, nFindCode(), ) ; // <-- added here
ON ENTER { || FrmTest.Brotest.SetFocus }
...
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Lookup Table
Hello Grigory,
Thanks a lot for your prompt help
But again I got some errors when pressing F2
With best regards.
Sudip
Thanks a lot for your prompt help
But again I got some errors when pressing F2
Code: Select all
Date:10.11.09 Time: 20:40:02
Error: Harbour MiniGUI 2.9.5 (2009.10.09)
Control: BroTESt Of FrmTest Not defined. Program Terminated
Called from SETPROPERTY(6373)
Called from NFINDCODE(439)
Called from (b)DATATABLE(175)
Called from _DOCONTROLEVENTPROCEDURE(4740)
Called from EVENTS(1399)
Called from SETWINDOWTEXT(0)
Called from _DEFINEMASKEDTEXTBOX(391)
Called from DATATABLE(175)
Called from OPENTEST(465)
Called from (b)EXAMPLE(87)
Called from _DOCONTROLEVENTPROCEDURE(4740)
Called from EVENTS(553)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4428)
Called from EXAMPLE(103)
Called from (b)MAIN(45)
Called from _DOCONTROLEVENTPROCEDURE(4740)
Called from EVENTS(1319)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4382)
Called from MAIN(59)
Sudip
With best regards,
Sudip
Sudip
Re: Lookup Table
Sudip,sudip wrote:Hello Grigory,
Thanks a lot for your prompt help
But again I got some errors when pressing F2
Ok. Please replace the all PROCEDURE DataTable with code below:
Code: Select all
PROCEDURE DataTable()
Public lAddrow := .F.
Public lInit := .F.
If .Not. IsWIndowActive ( FrmTest )
DEFINE WINDOW FrmTest ;
AT 0,0 ;
WIDTH 700 HEIGHT 650 ;
TITLE 'Test table' ;
ICON 'kotac' ;
CHILD NOSIZE NOMAXIMIZE ;
ON INIT {|| lInit := .T. } ;
ON RELEASE {|| lInit := .F. }
DEFINE LABEL Label_Trazi
ROW 1
COL 20
WIDTH 45
HEIGHT 20
VALUE " Find: "
FONTNAME "Arial"
FONTSIZE 9
TOOLTIP ""
FONTBOLD .T.
FONTITALIC .F.
FONTUNDERLINE .F.
FONTSTRIKEOUT .F.
HELPID NIL
VISIBLE .T.
TRANSPARENT .F.
ACTION NIL
AUTOSIZE .F.
BACKCOLOR NIL
FONTCOLOR NIL
CENTERALIGN .T.
END LABEL
@ 1,100 TEXTBOX TBoxFind VALUE 1 HEIGHT 23 WIDTH 100 NUMERIC INPUTMASK '9999999999' RIGHTALIGN;
ON CHANGE iif(lInit,nFindCode(), ) ;
ON ENTER { || FrmTest.Brotest.SetFocus }
DEFINE TAB Tab_1 AT 30,10 WIDTH 660 HEIGHT 550 VALUE 1 FONT "Arial" SIZE 9 ;
TOOLTIP "Test table" ON CHANGE NIL FLAT
PAGE "Table browse"
@ 30,10 BROWSE BroTest ;
WIDTH 630 ;
HEIGHT 500 ;
HEADERS { 'Code','First name', 'Last name', 'Birth date', 'MarRied','BIO'} ;
WIDTHS { 90,150,150,100,150 } ;
WORKAREA Test ;
FIELDS { 'Test->CODE','Test->FIRST','Test->LAST','Test->BIRTH','Test->MARRIED','Test->MARRIED'} ;
JUSTIFY { BROWSE_JTFY_RIGHT, BROWSE_JTFY_RIGHT, BROWSE_JTFY_RIGHT ,BROWSE_JTFY_LEFT, BROWSE_JTFY_LEFT, BROWSE_JTFY_LEFT} ;
ON CHANGE { || Load_Row() } ;
ON DBLCLICK {|| IIF(CallTest = " ", CallTest := " ",FrmTest.RELEASE), ReturnData() } ;
ON GOTFOCUS {|| OpenSELT(1) }
END PAGE
PAGE "Data for view and correction"
DEFINE FRAME Frame_1
ROW 040
COL 10
WIDTH 610
HEIGHT 400
FONTNAME "ARIAL"
FONTSIZE 9
FONTBOLD .F.
FONTITALIC .F.
FONTUNDERLINE .F.
FONTSTRIKEOUT .F.
CAPTION "Data table"
BACKCOLOR NIL
FONTCOLOR NIL
// TRANSPARENT .T.
END FRAME
@ 060,020 LABEL Lid VALUE "Code:" WIDTH 95 HEIGHT 23 FONT "ARIAL" SIZE 09
@ 060,120 TEXTBOX nCode HEIGHT 23 WIDTH 100 NUMERIC INPUTMASK '9999999999' RIGHTALIGN ;
ON ENTER {|| FrmTest.cFirst.SetFocus }
@ 090,020 LABEL lfrlas VALUE "First name Last name" WIDTH 390 HEIGHT 25 FONT "ARIAL" SIZE 09
@ 120,020 TEXTBOX cFirst WIDTH 150 HEIGHT 23 MAXLENGTH 30 VALUE "" FONT "ARIAL" SIZE 09 ;
ON ENTER {|| FrmTest.cLast.SetFocus}
@ 120,200 TEXTBOX cLast WIDTH 150 HEIGHT 23 MAXLENGTH 30 VALUE "" FONT 'Arial' SIZE 10 ;
ON ENTER {|| FrmTest.dBirth.SetFocus}
@ 150,020 LABEL Ldb VALUE "Birth:" WIDTH 95 HEIGHT 23 FONT "ARIAL" SIZE 09
@ 150,120 TEXTBOX dBirth HEIGHT 23 WIDTH 80 DATE ;
ON ENTER FrmTest.lMar.SetFocus
@ 180,020 CHECKBOX lMar CAPTION 'Married' ;
width 120 value .f. ;
ON CHANGE {|| nil } ;
ON LOSTFOCUS {|| FrmTest.eBio.SetFocus }
@ 210,020 EDITBOX eBio ;
WIDTH 550 ;
HEIGHT 130
@ 470,020 BUTTON SaveTest CAPTION "&Save" WIDTH 90 HEIGHT 25 ACTION {|| SaveTest() }
@ 470,480 BUTTON CancelTest CAPTION "&Cancel" WIDTH 90 HEIGHT 25 ACTION {|| CancelTest() }
END PAGE
END TAB
@ 001,400 BUTTON NewTest CAPTION "&Add" WIDTH 90 HEIGHT 25 ACTION {|| AddTest() }
@ 001,490 BUTTON CorTest CAPTION "&Edit" WIDTH 90 HEIGHT 25 ACTION {|| EditTest() }
@ 001,580 BUTTON EraTest CAPTION "&Delete" WIDTH 90 HEIGHT 25 ACTION {|| EraseTest() }
WhatButton()
FrmTest.TBoxFind.SetFocus
END WINDOW
CENTER WINDOW FrmTest
LoadTest()
DisabTestField()
ACTIVATE WINDOW FrmTest
ELSE
FrmTest.SetFocus
ENDIF
Return
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Lookup Table
Hello Grigory,
Thanks a lot. It runs fine with HMG
Again, as a learner of both versions I want to know what's the difference between previous and current code
Thanks in advance
With best regards.
Sudip
Thanks a lot. It runs fine with HMG
Again, as a learner of both versions I want to know what's the difference between previous and current code
Thanks in advance
With best regards.
Sudip
With best regards,
Sudip
Sudip