I'm trying to make a tool that we facilitate programming now trying to present what will be on the screen
The question is why a program error occurs on line 69?
Green fields are label and there need display L_Name
Orange fields are fields and there need display F_Name
whats wrong in program?
Moderator: Rathinagiri
- dragancesu
- Posts: 929
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
whats wrong in program?
- Attachments
-
- wrong.zip
- (1.37 KiB) Downloaded 606 times
Re: whats wrong in program?
Hi Dragan,
Try
Hope that helps 
Try
Code: Select all
...
_labx = 'label' + hb_ntos(_GetId())
_labv = l_name
// labels
//altd()
@ _rowl, _coll LABEL &(_labx) VALUE _labv OF FromTest
...

Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- dragancesu
- Posts: 929
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: whats wrong in program?
Yes, it's help
Solve is
Thank you
Solve is
Code: Select all
#include <hmg.ch>
*:*****************************************************
FUNCTION main // fm_test
DEFINE WINDOW FromTest ;
AT 10,10 ;
WIDTH 800 ;
HEIGHT 800 ;
TITLE 'Preview Form' ;
MAIN ; // MODAL
ON KEY ESCAPE ACTION FromTest.Release
@ 700, 700 LABEL label1x ; // << label1 is duplcate name
VALUE " LEGEND "
@ 720, 700 LABEL label2x ; // << label2 is duplcate name
VALUE " GRID "
@ 735, 700 LABEL label3x ; // << label3 is duplcate name
VALUE " LABEL "
@ 750, 700 LABEL label4x ; // << label4 is duplcate name
VALUE " FIELD "
END WINDOW
fmTest()
CENTER WINDOW FromTest
ACTIVATE WINDOW FromTest
Return
*:******************************************************
function fmTest
// make line
DRAW LINE IN WINDOW FromTest AT 710,5 TO 710,795
// show legenda
DRAW RECTANGLE IN WINDOW FromTest AT 720,680 TO 730,690 pencolor { 128,128,255 } FILLCOLOR { 128,128,255 }
DRAW RECTANGLE IN WINDOW FromTest AT 735,680 TO 745,690 pencolor { 55,201,48 } FILLCOLOR { 55,201,48 }
DRAW RECTANGLE IN WINDOW FromTest AT 750,680 TO 760,690 pencolor { 255,102,10 } FILLCOLOR { 255,102,10 }
// show grid
DRAW RECTANGLE IN WINDOW FromTest AT 90,10 TO 390,710 pencolor { 128,128,255 } FILLCOLOR { 128,128,255 }
use _my_frm
dbgotop()
do while .not. eof()
_row1 = f_row
_col1 = f_col
_row2 = f_row + 20
_col2 = f_col + f_width
_rowl = f_row + l_row
_coll = f_col + l_col
_labx = 'label' + alltrim(str(recno()))
_labxx = 'label' + alltrim(str(recno()+100))
_labv = l_name
_labf = f_name
// labels
if !empty(L_name)
DRAW RECTANGLE IN WINDOW FromTest AT _rowl, _coll TO _rowl+15, _coll+50 pencolor { 55,201,48 } FILLCOLOR { 55,201,48 }
@ _rowl, _coll LABEL &(_labx) VALUE _labv OF FromTest transparent // << tranparent if you want see rectangle
endif
// fields
DRAW RECTANGLE IN WINDOW FromTest AT _row1, _col1 TO _row2, _col2 pencolor { 255,102,10 } FILLCOLOR { 255,102,10 }
@ _row1, _col1 LABEL &(_labxx) VALUE _labf OF FromTest transparent // << tranparent if you want see rectangle
dbskip()
enddo
RETURN 0