use FMG more than once
Moderator: Rathinagiri
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
use FMG more than once
hi,
i have create my 1st FMG and it work.
now i think how does it work if i want to use same FMG twice (or more) at same time
what i mean :
let say we have a GRID a select 1st Item. now you want "more" and press ENTER and FMG appear.
even if FMG is still open i like to change to GRID an choise other Item and "open" it -> FMG twice
so how to do it with harbour / HMG
i have create my 1st FMG and it work.
now i think how does it work if i want to use same FMG twice (or more) at same time
what i mean :
let say we have a GRID a select 1st Item. now you want "more" and press ENTER and FMG appear.
even if FMG is still open i like to change to GRID an choise other Item and "open" it -> FMG twice
so how to do it with harbour / HMG
have fun
Jimmy
Jimmy
Re: use FMG more than once
As I understand well, you should open child window after ENTER is pressed
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: use FMG more than once
hi,
Yes Form open after ENTER or DblClick on GRID Item.
but what when have Form open, change to GRID and choise other ITEM and open 2nd FORM
in MAIN i do this
but which Result is it from 1st Form or from 2nd Form
this is my Problem with "multi" Form.
in Xbase++ i use OOP so Result is ok
Yes Form open after ENTER or DblClick on GRID Item.
but what when have Form open, change to GRID and choise other ITEM and open 2nd FORM
Code: Select all
Function Setup()
DEFINE WINDOW Win_Setup ;
...
@ 050,200+50 TEXTBOX TEXT_1 ;
FIELD POP3->POP3 ;
Code: Select all
nResult := Win_Setup.TEXT_1.Value
this is my Problem with "multi" Form.
in Xbase++ i use OOP so Result is ok
have fun
Jimmy
Jimmy
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: use FMG more than once
I don't understand what you really need, the translation is not faithful when translating the page.
I think you should use the code provided by EDK.
I think you should use the code provided by EDK.
Code: Select all
#include "hmg.ch"
Function Main
Local aRows [20] [3]
_HMG_LastActiveGridIndex := 0
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 800 ;
HEIGHT 550 ;
TITLE 'Hello World!' ;
MAIN
aRows [1] := {'Simpson','Homer','555-5555'}
aRows [2] := {'Mulder','Fox','324-6432'}
aRows [3] := {'Smart','Max','432-5892'}
aRows [4] := {'Grillo','Pepe','894-2332'}
aRows [5] := {'Kirk','James','346-9873'}
aRows [6] := {'Barriga','Carlos','394-9654'}
aRows [7] := {'Flanders','Ned','435-3211'}
aRows [8] := {'Smith','John','123-1234'}
aRows [9] := {'Pedemonti','Flavio','000-0000'}
aRows [10] := {'Gomez','Juan','583-4832'}
aRows [11] := {'Fernandez','Raul','321-4332'}
aRows [12] := {'Borges','Javier','326-9430'}
aRows [13] := {'Alvarez','Alberto','543-7898'}
aRows [14] := {'Gonzalez','Ambo','437-8473'}
aRows [15] := {'Batistuta','Gol','485-2843'}
aRows [16] := {'Vinazzi','Amigo','394-5983'}
aRows [17] := {'Pedemonti','Flavio','534-7984'}
aRows [18] := {'Samarbide','Armando','854-7873'}
aRows [19] := {'Pradon','Alejandra','???-????'}
aRows [20] := {'Reyes','Monica','432-5836'}
DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 30,30
BUTTON B_FIND CAPTION "[F2] Find" ACTION ShowLastFocusedGrid()
END TOOLBAR
@ 50,10 GRID Grid_Master ;
WIDTH 760 ;
HEIGHT 180 ;
HEADERS {'Last Name','First Name','Phone'} ;
WIDTHS {140,140,140};
ITEMS aRows ;
VALUE {1,1} ;
TOOLTIP 'Editable Grid Control' ;
ON GOTFOCUS _HMG_LastActiveGridIndex := GetLastActiveControlIndex ();
EDIT ;
JUSTIFY { GRID_JTFY_CENTER,GRID_JTFY_RIGHT, GRID_JTFY_RIGHT } ;
CELLNAVIGATION
@ 240,10 GRID Grid_Detail ;
WIDTH 760 ;
HEIGHT 180 ;
HEADERS {'Last Name','First Name','Phone'} ;
WIDTHS {140,140,140};
ITEMS aRows ;
VALUE 1 ;
ON GOTFOCUS _HMG_LastActiveGridIndex := GetLastActiveControlIndex ();
EDIT ;
TOOLTIP 'Editable Grid Control' ;
ON HEADCLICK { {||MsgInfo('Click 1')} , {||MsgInfo('Click 2')} , {||MsgInfo('Click 3')} } ;
JUSTIFY { GRID_JTFY_LEFT,GRID_JTFY_CENTER, GRID_JTFY_CENTER }
@ 440, 10 BUTTON Button_1 CAPTION "Last GRID" ACTION ShowLastFocusedGrid()
ON KEY F2 ACTION ShowLastFocusedGrid()
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return
***********************************
Function ShowLastFocusedGrid()
Local i := _HMG_LastActiveGridIndex
Local aCtrlData
IF i > 0
aCtrlData := GetControlDataByIndex (i)
MsgInfo (e"Control name\t: " + aCtrlData [2] + CRLF +;
e"Control type\t: " + aCtrlData [1] + CRLF +;
e"Form name\t: " + aCtrlData [40] [40], "The last focused grid" )
ENDIF
RETURN
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: use FMG more than once
AUGE
Something like this, the background screen is the grid, I double click and the window appears in the front with the information,
Something like this, the background screen is the grid, I double click and the window appears in the front with the information,
- Attachments
-
- UNdqwdTITLED.jpg (80.83 KiB) Viewed 3700 times
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: use FMG more than once
YES ... but now, leave Detail Form open, i want to go to GRID an take another Item and DblClick.
i'm now on a other Record an got Data from "this" Record, or
---
i saw Sample with Macro as Form-Name
Code: Select all
DEFINE WINDOW &fMain ;
Code: Select all
nResult1 := Form_01.TEXT_1.Value
nResult2 := Form_02.TEXT_1.Value
have fun
Jimmy
Jimmy
Re: use FMG more than once
AUGE_OHR wrote: ↑Fri Nov 22, 2019 8:33 pm i saw Sample with Macro as Form-Nameso when 1st Form is called by "Form_01" and 2nd Form is called "Form_02" that i can useCode: Select all
DEFINE WINDOW &fMain ;
so how to get this construction.Code: Select all
nResult1 := Form_01.TEXT_1.Value nResult2 := Form_02.TEXT_1.Value
Code: Select all
nResult := GetProperty ( fMain, "TEXT_1", "Value")
Re: use FMG more than once
AUGE_OHR
No logro ver el panorama completo de lo que quieres hacer...
Si doy 20 veces "dobleclick" en uno o varios registros del grid,
voy a tener 20 ventanas abiertas en mi pantalla ???
*----------------------------------------------------------------------------
AUGE_OHR
I can't see the full picture of what you want to do ...
If I give doubleclick 20 times in one or more grid records,
Will I have 20 windows open on my screen ???
No logro ver el panorama completo de lo que quieres hacer...
Si doy 20 veces "dobleclick" en uno o varios registros del grid,
voy a tener 20 ventanas abiertas en mi pantalla ???
*----------------------------------------------------------------------------
AUGE_OHR
I can't see the full picture of what you want to do ...
If I give doubleclick 20 times in one or more grid records,
Will I have 20 windows open on my screen ???
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: use FMG more than once
It is not understood what you really want to do
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: use FMG more than once
YES ... not 20 but more than 1andyglezl wrote: ↑Fri Nov 22, 2019 9:27 pm Si doy 20 veces "dobleclick" en uno o varios registros del grid,
voy a tener 20 ventanas abiertas en mi pantalla ???
*----------------------------------------------------------------------------
If I give doubleclick 20 times in one or more grid records,
Will I have 20 windows open on my screen ???
guess you working on Client "A" and than Client "B" call on Phone.
i do not want to close "work of A", just open a new Form with Data of Client "B"
it is Windows not Cl*pper so User can have many if they need.
but i need to "control" them and i have to figure out how it work with FMG file
---
under Xbase++ i use OOP and i can
Code: Select all
AADD(aThread, oThread)
Code: Select all
nPosi := ASCAN(aThread, {|e| e = oThread } )
have fun
Jimmy
Jimmy