grid/browse for invoicing help

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Javier Tovar
Posts: 1274
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México
Has thanked: 1 time
Been thanked: 2 times

Re: grid/browse for invoicing help

Post by Javier Tovar » Wed Feb 05, 2014 4:52 am

Ah OK, if you do not care about the LOCAL variable, Post had used a variable that was testing the example until it was correct and I forget, but should work well.

Saludos

franco
Posts: 213
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 6 times

Post by franco » Wed Feb 05, 2014 4:59 am

Javier,
My sample works exactly like i wanted. with the (on change) every time the cell is modified the grid
is updated and the table is updated.
Also in the SalvaCell() function I will be able to update text boxes out side the grid
Like sum qty*unit_price to mtotal......text1.value := mtotal .... and so on.
Thanks again .................................. Franco

Javier Tovar
Posts: 1274
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar » Wed Feb 05, 2014 5:04 am

If so is a friend, glad that you found the solution.

regards

MICROVOLUTION
Posts: 24
Joined: Sat May 30, 2015 5:15 am

Post by MICROVOLUTION » Tue Dec 05, 2017 11:22 am

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
grid_antes do erro.png (10.85 KiB) Viewed 59 times
após clicarmos na barra de rolagem o sistema trava/fica lento →

grid_após erro.png
grid_após erro.png
grid_após erro.png (8.09 KiB) Viewed 59 times
thankssss for help me!!!

User avatar
dragancesu
Posts: 478
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 75 times

Post by dragancesu » Tue Dec 05, 2017 12:15 pm

This is part of POS (point of sale) program?

I will help but send some test data: articles (code, name, price) and sales (date, number, code, quantity, value)

thank you

p.s. if posible English version field name or a translation

User avatar
serge_girard
Posts: 1907
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 318 times
Been thanked: 74 times
Contact:

Post by serge_girard » Tue Dec 05, 2017 1:54 pm

Or maybe send all the PRG. Would be much easier to detect what's going wrong!

Serge

Post Reply