Subject |
Re: dbl left clik in browse screen |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Thu, 19 Apr 2018 17:17:27 +0200 |
Newsgroups |
dbase.getting-started |
Attachment(s) |
test_wo.wfm |
On 2018-04-18 2:46 PM, ed furche wrote:
> ed furche Wrote:
>
> I have attached a test WFM and a DBF. Am I doing something wrong??? I dont know how to refer to the field I want to store in the entryfield. Do I use WO->WONO OR WO1->WONO?
>
>> I have always used a \\\"dbl left click\\\" in a browse screen to select a record. My new conversion system doesn\\\'t always point to the record I clicked. Sometimes it does, but if there is only one record in the browse screen, it doesnt.
>>
>> I try to store the work order number from the browse record and put in a public field called STWONO. then I try to seek a record in another database but the STWONO field is blank..
>>
>> I tried the \\\"ongotfocus\\\" but that didn\\\'t work either. the browse screen is enabled and can be \\\"modified\\\".
Firstly, WO->WONO, USE and BROWSE are all XDML commands (the original
dBASE commands) and they are not used with OODML i.e the new Object
Oriented Programming Language.
I have reworked your form slightly. You will need to left-click on a
workorder number in the grid to give the record focus. You can then
left double_click the record to place the WONO in the entryfield.
If you uncomment the line of code in the GRID1_onLeftMouseUp event
handler left-clicking on a WONO will place it in the entryfield.
Please don't copy files into .pdf files. Simply attach the original
.wfm or .prg file to your message.
Mervyn.
| ** END HEADER -- do not remove this line
//
// Generated on 2018-04-19
//
parameter bModal
local f
f = new TEST_woForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class TEST_woForm of FORM
with (this)
onOpen = class::FORM_ONOPEN
height = 20.7273
left = 42.4286
top = 3.4545
width = 59.7143
text = ""
endwith
this.WO1 = new QUERY(this)
with (this.WO1)
left = 74.0
top = 3.0
sql = 'select * from "WOTEST.DBF"'
active = true
endwith
this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
height = 1.0
left = 35.0
top = 1.2727
width = 13.0
value = "Entryfield1"
endwith
this.TEXT1 = new TEXT(this)
with (this.TEXT1)
height = 2.2727
left = 2.8571
top = 0.5
width = 29.2857
text = "<p>By left double clicking, I want to move the Wono to the Entryfield1</p><p>It moves the Wono in top record!!!.</p>"
endwith
this.GRID1 = new GRID(this)
with (this.GRID1)
onLeftDblClick = class::GRID1_ONLEFTDBLCLICK1
onLeftMouseUp = class::GRID1_ONLEFTMOUSEUP
dataLink = form.wo1.rowset
height = 11.7727
left = 5.7143
top = 3.5909
width = 49.2857
endwith
this.TEXT2 = new TEXT(this)
with (this.TEXT2)
height = 3.0
left = 11.0
top = 16.5
width = 37.0
text = "Left click on record to select record then left double click to copy WONO to entryfield."
endwith
this.rowset = this.wo1.rowset
function GRID1_onLeftDblClick1(flags, col, row)
form.entryfield1.value = form.wo1.rowset.fields['wono'].value
// DO DEBUGON
// STORE WONO TO FORM.ENTRYFIELD1.VALUE
return
function GRID1_onLeftMouseUp(flags, col, row)
// form.entryfield1.value = form.wo1.rowset.fields['wono'].value
return
function form_onOpen()
// USE WO
// GOTO TOP
return
endclass
|
|