Help with using IDE
Moderator: Rathinagiri
Re: Help with using IDE
I think you should start with HMG.3.
Works on HMG.4 are suspended and I'm afraid there is no one able to continue this project for now...
It's sad, but it's true
Regards, Marek
Works on HMG.4 are suspended and I'm afraid there is no one able to continue this project for now...
It's sad, but it's true
Regards, Marek
Re: Help with using IDE
No problem. I just switched over to HMG.3.
Now I am back to my original problem (but in version 3). How do I populate a Grid control with the date from a table?
Thanks.
Mark
Now I am back to my original problem (but in version 3). How do I populate a Grid control with the date from a table?
Thanks.
Mark
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Help with using IDE
C:\hmg\SAMPLES\GRID.25MGOLDFARB wrote:No problem. I just switched over to HMG.3.
Now I am back to my original problem (but in version 3). How do I populate a Grid control with the date from a table?
Viva INTERNATIONAL HMG
Re: Help with using IDE
Thanks! That did the trick. The grid now working.
The table has a few thousand entries (list is sorted by customer ID). Grid will include the customer ID and customer name. It would be great if the user could begin typing the customer number and it will move to that row (or the closest matching row). If there an option for the Grid control to do that?
I think I am finally getting a hang of the GUI, thanks for all your help.
Mark
The table has a few thousand entries (list is sorted by customer ID). Grid will include the customer ID and customer name. It would be great if the user could begin typing the customer number and it will move to that row (or the closest matching row). If there an option for the Grid control to do that?
I think I am finally getting a hang of the GUI, thanks for all your help.
Mark
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Help with using IDE
Did you sort your table in customer id before loading data? Incremental search (of the first column only!) is effective irrespective of the fact that you have sorted or not sorted the data.
Please check this sample
Please check this sample
Code: Select all
#include <hmg.ch>
Function Main
define window sample at 0, 0 width 800 height 600 main
define label sortedlabel
row 10
col 10
width 200
value 'Grid with sorted data'
end label
define grid sorted
row 40
col 10
width 200
widths { 100, 100 }
headers { 'Month', 'ID' }
height 200
items { ;
{'April', 'Month4' },;
{'August', 'Month8' },;
{'December', 'Month12' },;
{'February', 'Month2' },;
{'January', 'Month1' },;
{'July', 'Month7' },;
{'June', 'Month6' },;
{'March', 'Month3' },;
{'May', 'Month5' },;
{'November', 'Month11' },;
{'October', 'Month10' },;
{'September', 'Month9' } }
value 1
end grid
define label unsortedlabel
row 240
col 10
width 200
value 'Grid with unsorted data'
end label
define grid unsorted
row 270
col 10
width 200
widths { 100, 100 }
headers { 'Month', 'ID' }
height 200
items { {'January', 'Month1' },;
{'February', 'Month2' },;
{'March', 'Month3' },;
{'April', 'Month4' },;
{'May', 'Month5' },;
{'June', 'Month6' },;
{'July', 'Month7' },;
{'August', 'Month8' },;
{'September', 'Month9' },;
{'October', 'Month10' },;
{'November', 'Month11' },;
{'December', 'Month12' }}
value 1
end grid
end window
sample.center
sample.activate
Return
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Help with using IDE
Hi Mark
In other hand, GRID ( and BROWSE too) is a AS IS control (like all others) doesn't (and not required) including such extra features.
For example, where ( into which control) user could begin typing their search data ?
As the result, for building an incremental search feature, you need do something extras
Follow the example introduced by Rathi; surely it will help to you.
Moreover you can look at my humble example Quick Search.
It's not for GRID, but BROWSE; anyway I hope to give an idea to you
Happy HMG'ing
That's good newsMGOLDFARB wrote:... The grid now working.
As Rathi said, you are about Incremental search and an effective Incremental search require sorted ( or indexed ) data.MGOLDFARB wrote: The table has a few thousand entries (list is sorted by customer ID). Grid will include the customer ID and customer name. It would be great if the user could begin typing the customer number and it will move to that row (or the closest matching row). If there an option for the Grid control to do that?
In other hand, GRID ( and BROWSE too) is a AS IS control (like all others) doesn't (and not required) including such extra features.
For example, where ( into which control) user could begin typing their search data ?
As the result, for building an incremental search feature, you need do something extras
Follow the example introduced by Rathi; surely it will help to you.
Moreover you can look at my humble example Quick Search.
It's not for GRID, but BROWSE; anyway I hope to give an idea to you
You are welcome to wonderful land of HMGMGOLDFARB wrote: I think I am finally getting a hang of the GUI...
Happy HMG'ing
Viva INTERNATIONAL HMG
Re: Help with using IDE
Thanks for the code. It does exactly what I want. However, I cannot figure out how to implement it into my code. I designed the form IDE, it is a FMG file. Which property allows me to do the incremental search? Overall your code looks very similar to the FMG code that is created.
In case it is helpful, here is the code of the FMG file for the form.
In case it is helpful, here is the code of the FMG file for the form.
Code: Select all
* HMG-IDE Form Designer Generated Code
* (c) Roberto Lopez - http://sites.google.com/site/hmgweb
DEFINE WINDOW TEMPLATE AT 133 , 302 WIDTH 550 HEIGHT 350 VIRTUAL WIDTH Nil VIRTUAL HEIGHT Nil TITLE "" ICON NIL CURSOR NIL ON INIT Nil ON RELEASE Nil ON INTERACTIVECLOSE Nil ON MOUSECLICK Nil ON MOUSEDRAG Nil ON MOUSEMOVE Nil ON SIZE Nil ON MAXIMIZE Nil ON MINIMIZE Nil ON PAINT Nil BACKCOLOR Nil NOTIFYICON NIL NOTIFYTOOLTIP NIL ON NOTIFYCLICK Nil ON GOTFOCUS Nil ON LOSTFOCUS Nil ON SCROLLUP Nil ON SCROLLDOWN Nil ON SCROLLLEFT Nil ON SCROLLRIGHT Nil ON HSCROLLBOX Nil ON VSCROLLBOX Nil
DEFINE GRID Grid_1
ROW 90
COL 40
WIDTH 470
HEIGHT 200
ITEMS { {""} }
VALUE 1
WIDTHS { 170,300 }
HEADERS {'Client ID','Client Name'}
FONTNAME "Arial"
FONTSIZE 9
TOOLTIP ""
ONCHANGE Nil
ONGOTFOCUS Nil
ONLOSTFOCUS Nil
FONTBOLD .F.
FONTITALIC .F.
FONTUNDERLINE .F.
FONTSTRIKEOUT .F.
ONDBLCLICK Nil
ONHEADCLICK Nil
ONQUERYDATA Nil
MULTISELECT .F.
ALLOWEDIT .F.
VIRTUAL .F.
DYNAMICBACKCOLOR Nil
DYNAMICFORECOLOR Nil
COLUMNWHEN Nil
COLUMNVALID Nil
COLUMNCONTROLS {{'TEXTBOX','NUMERIC','9999'},{'TEXTBOX','CHARACTER'}}
SHOWHEADERS .T.
CELLNAVIGATION .F.
NOLINES .F.
HELPID Nil
IMAGE Nil
JUSTIFY Nil
ITEMCOUNT Nil
BACKCOLOR NIL
FONTCOLOR NIL
HEADERIMAGES Nil
ROWSOURCE "Clients"
COLUMNFIELDS {'cl_id','cl_name'}
ALLOWAPPEND .F.
ALLOWDELETE .F.
BUFFERED .F.
DYNAMICDISPLAY Nil
ONSAVE Nil
LOCKCOLUMNS 0
END GRID
DEFINE TEXTBOX Next_Client_ID
ROW 40
COL 220
WIDTH 120
HEIGHT 24
FONTNAME "Arial"
FONTSIZE 9
TOOLTIP ""
ONCHANGE Nil
ONGOTFOCUS Nil
ONLOSTFOCUS Nil
FONTBOLD .F.
FONTITALIC .F.
FONTUNDERLINE .F.
FONTSTRIKEOUT .F.
ONENTER Nil
HELPID Nil
TABSTOP .T.
VISIBLE .T.
READONLY .F.
RIGHTALIGN .F.
DISABLEDBACKCOLOR Nil
DISABLEDFONTCOLOR Nil
CASECONVERT NONE
BACKCOLOR NIL
FONTCOLOR NIL
INPUTMASK Nil
FORMAT Nil
NUMERIC .T.
VALUE Nil
END TEXTBOX
END WINDOW
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Help with using IDE
Hi,
I have done nothing actually. It is the default property of the ListView32 control of Windows32 API.
I have done nothing actually. It is the default property of the ListView32 control of Windows32 API.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Help with using IDE
Ok. Any suggestions then in the grid I outlined above, it does not work?
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Help with using IDE
MGOLDFARB wrote: ...It would be great if the user could begin typing the customer number and it will move to that row (or the closest matching row). If there an option for the Grid control to do that?
.esgici wrote:GRID doesn't include such extra features.
For example, where ( into which control) user could begin typing their search data ?
As the result, for building an incremental search feature, you need do something extras
I don't know how I can help youMGOLDFARB wrote:Which property allows me to do the incremental search?
Does may be such sample : Browsing a table via GRID
Viva INTERNATIONAL HMG