Article View: borland.public.vdbase.forms
Article #152Re: onLeftDblClick
From: Romain Strieff [TeamB]
Date: Wed, 03 Mar 1999 00:00
Date: Wed, 03 Mar 1999 00:00
98 lines
3268 bytes
3268 bytes
In article <36dc5ad5.3152627@forums.inprise.com>, Juergen Koethnig
politely paraphrased ...
> >What are you trying to do exactly?
> >But don't let yourself frighten off by the Winapi, I don't understand it
> >either, I just fiddle until it works.<G> The above method _is_ simple,
> >you write it only _once_ and use it everywhere.
>
> I do have a form. This form contains a grid showing a list of
> students. By clicking one of the students, this rowset is 'marked'. I
> have placed a button, so by pushing this one, you can go to the
> detailed information of that student on a different form. So far so
> good. I want to avoid that extra move from clicking the student to
> clicking the button. I would like to go to the next form by
> doubleclicking the student in the grid.
>
Where's the problem exactly, see the example below that works for me.
if not file("stud.dbf")
create table "stud.dbf"(;
id autoinc,;
Lastname char(25),;
Firstname char(25))
use "stud.dbf"
append blank
replace Lastname with "Miller",;
Firstname with "Joe"
append blank
replace Lastname with "Smith",;
Firstname with "Joe"
append blank
replace Lastname with "Doe",;
Firstname with "John"
use
endif
** END HEADER -- do not remove this line
//
// Generated on 03/03/99
//
parameter bModal
local f
f = new studForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class studForm of FORM
with (this)
scaleFontBold = false
height = 16
left = 53
top = 0
width = 40
text = ""
endwith
this.STUD1 = new QUERY()
this.STUD1.parent = this
with (this.STUD1)
left = 21.5714
top = 1.3636
sql = 'select * from "stud.dbf"'
active = true
endwith
this.GRID1 = new GRID(this)
with (this.GRID1)
onLeftDblClick = class::GRID1_ONLEFTDBLCLICK
dataLink = form.stud1.rowset
bgColor = "white"
rowSelect = true
height = 11.6818
left = 1.5714
top = 1.7273
width = 36
endwith
this.rowset = this.stud1.rowset
function GRID1_onLeftDblClick(flags, col, row)
//Here you would start the for with the ID value or whatever
msgbox(form.rowset.fields["lastname"].value)
return
endclass
--
Romain Strieff [TeamB]
Please read this newsgroup guide below before
posting on the private Inprise newsgroups.
http://www.inprise.com/newsgroups/guide.html
--
Technical Details
Message-ID:
<MPG.11471ad3eeb88d3c989f80@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36d97bf2.4621417@forums.inprise.com> <7bd6v0$p9e5@forums.borland.com> <36da5ce5.483192@forums.inprise.com> <7be60b$ptv15@forums.borland.com> <MPG.1144ce447d6210c989f40@forums.inprise.com> <36dba648.8303378@forums.inprise.com> <MPG.1146287156c6fbde989f65@forums.inprise.com> <36dc5ad5.3152627@forums.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 15bdfb,5ce837f094244033 X-Google-Attributes: gid15bdfb,public From: teamb@opto-pps.com (Romain Strieff [TeamB]) Subject: Re: onLeftDblClick Date: 1999/03/03 Message-ID: <MPG.11471ad3eeb88d3c989f80@forums.inprise.com> X-Deja-AN: 450698223 References: <36d97bf2.4621417@forums.inprise.com> <7bd6v0$p9e5@forums.borland.com> <36da5ce5.483192@forums.inprise.com> <7be60b$ptv15@forums.borland.com> <MPG.1144ce447d6210c989f40@forums.inprise.com> <36dba648.8303378@forums.inprise.com> <MPG.1146287156c6fbde989f65@forums.inprise.com> <36dc5ad5.3152627@forums.inprise.com> Organization: TeamB Newsgroups: borland.public.vdbase.forms