for my still growing app I must enter some data, which only exist on a sheet of paper.
in table bbpers.dbf are information of about 40 truckers, who do their job, delievering our customers with food-products.
For calculations I need daily for some of them (3 or 5) one special information out of 3 possible informations, I intend to do this with radiogroup control.
My problem is:
I have defined a grid and can select daily the persons of which I need an information. Works just fine, but:
I have defined a button, that, when clicked closes the grid.
As soon as I need a second "page" in the grid the button changes position on the screen, disappear, shows up again.
See my code.
Code: Select all
#include <hmg.ch>
//prg is called from a main.prg
SET LANGUAGE TO GERMAN
REQUEST HB_SETCODEPAGE
HB_SETCODEPAGE ('ES850')
public cPersnr
OpenTables()
DEFINE WINDOW Form_1 ;
AT 10,10 ;
WIDTH 900 ;
HEIGHT 1200 ;
TITLE "Fahrer " ;
@ 10,10 GRID Grid_1 ;
PARENT Form_1 ;
WIDTH 1000 ;
HEIGHT 830 ;
value {1,1} ;
On DblClick test() ;
HEADERS {"Persnr","Name","Vorname","Strasse","PLZ","Ort"} ;
WIDTHS {50,100,100,100,50,100} ;
ROWSOURCE "bbpers" ;
COLUMNFIELDS {"bbpers->persnr","bbpers->name","bbpers->vname","bbpers->str","bbpers->plz","bbpers->ort"}
On Key F10 ACTION ende()
@ 40, 600 BUTTON button ;
PARENT form_1 ;
CAPTION "Ende F-10" ;
WIDTH 200 ;
HEIGHT 50 ;
ONCLICK form_1.release
END WINDOW
ACTIVATE WINDOW Form_1
RETURN NIL
procedure OpenTables()
USE bbpers
index on name+vname to nvname
return nil
function test
SetProperty('Form_1', 'Grid_1','Visible', .F.)
go Form_1.Grid_1.RecNo
MsgInfo (bbpers->persnr+bbpers->name+str(Form_1.Grid_1.RecNo))
SetProperty('Form_1', 'Grid_1','Visible', .T.)
Form_1.Grid_1.SetFocus
return
function ende
form_1.release
hb_setcodepage('DEWIN')
return
I hope someone can help.
Thx in advance.
Greetings
Robert