Good Morning.
I'm learning to migrate now by the graphical mode that HMG allows using IDE / HMG 3.4.4. a screen for supermarket sale.
As we are accustomed as the procedural mode of the traditional clipper / harbor language I still can not understand the idea of how POO works - Object Oriented Programming. I know that for most of you what I'm going to ask "may even be" idiotisse, but, I need a lot of help, otherwise I would not be bothering them.
My system is mixed (console along with gui).
Then in this first GUI screen, it is called by the CONSOLE screen which contains the main menu and sub-menus.
To receive the products and quantities of the sale, I am using two (2) TEXTBOX.
For them to appear on the screen, I'm using a MATRIX that is placed inside the GRID_
As soon as the user enters the product code (TXTCDPRODUTO) it automatically goes to the TXTQT (TEXTBOX of the quantity of that product that will be released on sale.
Well, so far so good. But when you check the quantity in the stock and that everything is okay, we show on the left screen a replica of what the printed version will look like.
Products are usually launched on-screen through GRID_
The PROBLEM is the moment you click on the GRID horizontal scroll bar to see all. I created a screen with a very basic GRID (as in ACHOICE that it is exclusively for CONSOLE) ... the GRID erases everything that is shown and the system is so slow looking like a wagon.
My GRID_ codes are in a few lines. See:
Code: Select all
define window frm_main
(...)
define GRID grid_1
row 50
col 08
WIDTH 440
HEIGHT 350
HEADERS {'Cd','Nome Prd','Qt','Vr.Un.','Vr.Total'}
WIDTHS {100,240,30,50,100,120}
ColumnCONTROLS { {'TEXTBOX','NUMERIC', '999999999999'} , 'TEXTBOX' , 'TEXTBOX' , 'TEXTBOX' , 'TEXTBOX' }
DYNAMICFORECOLOR { fColor , fColor , fColor , fColor , fColor }
cellnavigation .t.
EDITOPTION GRID_EDIT_DEFAULT
allowedit .t.
end GRID
(...)
end window
the above lines are to start the GRID TEXTBOX, labels, etc.
Now the lines below are after the end of END WINDOW and are to individually place the products on the screen through GRID - as I explained well above.
Code: Select all
Frm_Main.Grid_1.AddItem ( { prod[01,01] , prod[01,02] , prod[01,03], prod[01,04], prod[01,05] } )
just that are my grid lines and nothing else.
The images before clicking on the scroll bar and after clicking are just below.
If anyone knows and can help me, I will be grateful↓:
antes do erro →
grid_antes do erro.png
- grid_antes do erro.png (10.85 KiB) Viewed 2170 times
após clicarmos na barra de rolagem o sistema trava/fica lento →
grid_após erro.png
- grid_após erro.png (8.09 KiB) Viewed 2170 times
thankssss for help me!!!