I'll think about that...Steed wrote:Hello Roberto,
Will be nice and more naturally, modify cell in a grid without press enter, like Excel or access (you only press any key -char or val- and the cell pass to edit mode adding the char or value that you have pressed)
Nice idea Sudip
Regards
Ed
HMG 3.0.25
Moderator: Rathinagiri
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.25
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: HMG 3.0.25
Hello,
We can't modify SQLMIX RDD tables with grid right now. Good news is that we can modify temporary tables created with HB_DBCREATETEMP() function with grid
But, I am not sure if there any problem with using this temporary tables
So, it will be very helpful regarding your views about using this temporary tables
Thanks in advance.
With best regards.
Sudip
We can't modify SQLMIX RDD tables with grid right now. Good news is that we can modify temporary tables created with HB_DBCREATETEMP() function with grid
But, I am not sure if there any problem with using this temporary tables
So, it will be very helpful regarding your views about using this temporary tables
Thanks in advance.
With best regards.
Sudip
With best regards,
Sudip
Sudip
Re: HMG 3.0.25
Hello Roberto,
I found some problem using grid and refreshing it after appending records in tables. I am creating a small sample from my project to demonstrate this. When "Calculate" button is clicked, grid shows an extra record.
(may be there is a bug in my code
)
Thanks in advance.
With best regards.
Sudip
I found some problem using grid and refreshing it after appending records in tables. I am creating a small sample from my project to demonstrate this. When "Calculate" button is clicked, grid shows an extra record.
Code: Select all
#include <minigui.ch>
static aMonth := {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
Function main()
local adbf := {}
if select("tempsalreg") > 0
select tempsalreg
use
endif
aadd(adbf, {"Empnm", "C", 40, 0})
aadd(adbf, {"Workdays", "N", 2, 0})
aadd(adbf, {"Basic", "N", 10, 2})
aadd(adbf, {"DA", "N", 10, 2})
aadd(adbf, {"FA", "N", 10, 2})
//DBCREATE("tempsalreg", adbf, "SQLMIX", .T., "TEMPSALREG")
hb_dbcreatetemp("tempsalreg", adbf)
DEFINE WINDOW frmSalreg ;
WIDTH 700 ;
HEIGHT 550 ;
TITLE "Salary Register" ;
main
DEFINE LABEL lblYear
ROW 10
COL 20
WIDTH 31
HEIGHT 20
VALUE "Year:"
END LABEL
DEFINE SPINNER spnYear
ROW 10
COL 60
WIDTH 70
HEIGHT 24
RANGEMIN 1
RANGEMAX 2050
END SPINNER
DEFINE LABEL lblMonth
ROW 10
COL 220
WIDTH 45
HEIGHT 21
VALUE "Month:"
END LABEL
DEFINE COMBOBOX cboMonth
ROW 10
COL 270
WIDTH 100
HEIGHT 100
ITEMS aMonth
END COMBOBOX
DEFINE BUTTON cmdCalc
ROW 10
COL 470
WIDTH 100
HEIGHT 28
ACTION SalRegCalc()
CAPTION "&Calculate"
END BUTTON
DEFINE GRID GRID_1
ROW 50
COL 20
WIDTH 610
HEIGHT 380
HEADERS {"Employee", "Wk Days", "Basic", "DA", "FA"}
WIDTHS {200, 100, 100, 100, 100}
ROWSOURCE "TEMPSALREG"
COLUMNFIELDS {"EMPNM", "WORKDAYS", "BASIC", "DA", "FA"}
JUSTIFY {0, 1, 1, 1, 1}
COLUMNCONTROLS {{"TEXTBOX", "CHARACTER"}, {"TEXTBOX", "NUMERIC", "999"}, {"TEXTBOX", "NUMERIC", "99999999.99"}, {"TEXTBOX", "NUMERIC", "99999999.99"}, {"TEXTBOX", "NUMERIC", "99999999.99"}}
ALLOWEDIT .T.
END GRID
END WINDOW
frmSalreg.spnYear.value := year(date())
frmSalreg.cboMonth.value := month(date())
frmSalreg.Center
frmSalreg.Activate
if select("tempsalreg") > 0
select tempsalreg
use
endif
Return Nil
static function SalRegCalc()
local table := {}, i
SELECT TEMPSALREG
zap
for i := 1 to 10
aadd(table, {"Employee "+ltrim(str(i))})
next
//table := sql(mdb, "select empnm from emp order by slno")
for i = 1 to len(table)
append blank
replace empnm with table[i, 1]
next
FRMSALREG.GRID_1.REFRESH
return nil
With best regards.
Sudip
With best regards,
Sudip
Sudip
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.25
I've only read about this feature on PsPad, but I don't know how to do it.Vanguarda wrote:Dear Roberto,
How do you like these clips were made?
example: In a OBJETIVE "textbox" want it presented a window like the one below, or not?
Sorry my bad english.
My best regards,
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.25
I'll check it ASAP.sudip wrote:Hello Roberto,
I found some problem using grid and refreshing it after appending records in tables. I am creating a small sample from my project to demonstrate this. When "Calculate" button is clicked, grid shows an extra record.(may be there is a bug in my code
)
Thanks in advance.Code: Select all
#include <minigui.ch> static aMonth := {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} Function main() local adbf := {} if select("tempsalreg") > 0 select tempsalreg use endif aadd(adbf, {"Empnm", "C", 40, 0}) aadd(adbf, {"Workdays", "N", 2, 0}) aadd(adbf, {"Basic", "N", 10, 2}) aadd(adbf, {"DA", "N", 10, 2}) aadd(adbf, {"FA", "N", 10, 2}) //DBCREATE("tempsalreg", adbf, "SQLMIX", .T., "TEMPSALREG") hb_dbcreatetemp("tempsalreg", adbf) DEFINE WINDOW frmSalreg ; WIDTH 700 ; HEIGHT 550 ; TITLE "Salary Register" ; main DEFINE LABEL lblYear ROW 10 COL 20 WIDTH 31 HEIGHT 20 VALUE "Year:" END LABEL DEFINE SPINNER spnYear ROW 10 COL 60 WIDTH 70 HEIGHT 24 RANGEMIN 1 RANGEMAX 2050 END SPINNER DEFINE LABEL lblMonth ROW 10 COL 220 WIDTH 45 HEIGHT 21 VALUE "Month:" END LABEL DEFINE COMBOBOX cboMonth ROW 10 COL 270 WIDTH 100 HEIGHT 100 ITEMS aMonth END COMBOBOX DEFINE BUTTON cmdCalc ROW 10 COL 470 WIDTH 100 HEIGHT 28 ACTION SalRegCalc() CAPTION "&Calculate" END BUTTON DEFINE GRID GRID_1 ROW 50 COL 20 WIDTH 610 HEIGHT 380 HEADERS {"Employee", "Wk Days", "Basic", "DA", "FA"} WIDTHS {200, 100, 100, 100, 100} ROWSOURCE "TEMPSALREG" COLUMNFIELDS {"EMPNM", "WORKDAYS", "BASIC", "DA", "FA"} JUSTIFY {0, 1, 1, 1, 1} COLUMNCONTROLS {{"TEXTBOX", "CHARACTER"}, {"TEXTBOX", "NUMERIC", "999"}, {"TEXTBOX", "NUMERIC", "99999999.99"}, {"TEXTBOX", "NUMERIC", "99999999.99"}, {"TEXTBOX", "NUMERIC", "99999999.99"}} ALLOWEDIT .T. END GRID END WINDOW frmSalreg.spnYear.value := year(date()) frmSalreg.cboMonth.value := month(date()) frmSalreg.Center frmSalreg.Activate if select("tempsalreg") > 0 select tempsalreg use endif Return Nil static function SalRegCalc() local table := {}, i SELECT TEMPSALREG zap for i := 1 to 10 aadd(table, {"Employee "+ltrim(str(i))}) next //table := sql(mdb, "select empnm from emp order by slno") for i = 1 to len(table) append blank replace empnm with table[i, 1] next FRMSALREG.GRID_1.REFRESH return nil![]()
With best regards.
Sudip
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: HMG 3.0.25
Hi dear Roberto,Roberto Lopez wrote: I've only read about this feature on PsPad, but I don't know how to do it.
I´ve working on clip for HMG on PsPad.
I still thinking about the best way for to do it.
I hope that when finished, it can be useful for all us.
I will finish it ASAP.
My best regards,
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.25
Thanks!Vanguarda wrote:Hi dear Roberto,Roberto Lopez wrote: I've only read about this feature on PsPad, but I don't know how to do it.
I´ve working on clip for HMG on PsPad.
I still thinking about the best way for to do it.
I hope that when finished, it can be useful for all us.
I will finish it ASAP.
My best regards,
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.25
I've added the 'OnSave' method to let the users create its own save procedures when working (ie) with SQL RDDs, so, you could do it now for SQLMIX.sudip wrote:Hello,
We can't modify SQLMIX RDD tables with grid right now.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.25
I confirm the bug.sudip wrote:Hello Roberto,
I found some problem using grid and refreshing it after appending records in tables. I am creating a small sample from my project to demonstrate this. When "Calculate" button is clicked, grid shows an extra record.(may be there is a bug in my code
)
The problem arises only when you add records without using the grid internal procedure for that.
I'm working on it.
Thanks for reporting.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.25
I've 'reduced' the problem.Roberto Lopez wrote: I confirm the bug.
The problem arises only when you add records without using the grid internal procedure for that.
It arises only when the table is empty at the moment of the grid creation.
In all other situations, adding records outside the grid appears to work fine.
I'm still working on it.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)