|
Home > Archive > Programming with dBASE > November 2005 > Disable left clic
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi
How to disable left clic of the mouse?
Thanks
Etienne Gounon
| |
| *Lysander* 2005-11-23, 7:23 am |
| In article <kWQK6tB8FHA.1228@news-server>, contact@c-4m.com says...
> Hi
>=20
> How to disable left clic of the mouse?
What do you want to achieve by that?
It is not efficiently possible to disable the left mouse button in your=20
dBase-applications. There is a possibility to disable it in complete=20
windows, but I think that is not what you want.
--=20
ciao,
Andr=E9
| |
|
| Hi André
I have two forms.
Thirst form as entryfield. It call second form which as a listbox. When I
right clic on the listbox a keyboard() function type the listbox value at
the cursor of thirst form entryfield. OK that is running.
But if the user LEFT CLIC on the listbox then the second form get focus and
the first form entryfield as no more cursor.
I tryed to be clear
Etienne Gounon
"*Lysander*" <nobody@nowhere.com> a écrit dans le message news:
MPG. 1dee79fccf4d073b9899
4a@news.dbase.com...
In article <kWQK6tB8FHA.1228@news-server>, contact@c-4m.com says...
> Hi
>
> How to disable left clic of the mouse?
What do you want to achieve by that?
It is not efficiently possible to disable the left mouse button in your
dBase-applications. There is a possibility to disable it in complete
windows, but I think that is not what you want.
--
ciao,
André
| |
| *Lysander* 2005-11-23, 11:23 am |
| In article <nxMFq8D8FHA.1520@news-server>, contact@c-4m.com says...
> But if the user LEFT CLIC on the listbox then the second form get focus a=
nd
> the first form entryfield as no more cursor.
>=20
> I tryed to be clear
yes, you have been clear enough.
What happens, if you are using the OnLeftMouseDown-Event of the Listbox?
Does it catch before the focus will be set to the listbox?
You should try this, but I assume, it will not help.
Try to make a construction, which will work even when the entryfield=20
does not have the cursor.
From the second form, you can have control over the entryfield in the=20
first form very easily.
Even more easy is to not open a second form but to construct and=20
destruct the listbox on demand, or to construct it and hide/show it on=20
demand.=20
I am doing something like this all the time throughout my application,=20
only I am not using the listboxes, but 1-column-grids instead.
If you need the keyboard() functionality, try to use a treeview-item=20
instead of a listbox. You can make a treeview look very much like a=20
listbox, and a treeview has the keyboard() functionality already built-
in.=20
--=20
ciao,
Andr=E9
| |
| Jean-Pierre Martel 2005-11-23, 11:23 am |
| In article <kWQK6tB8FHA.1228@news-server>, contact@c-4m.com says...
>
> How to disable left clic of the mouse?
Untested:
Function onLeftMouseDown
// nothing
return
Jean-Pierre Martel, editor
The dBASE Developers Bulletin
Blue Star dBASE Plus Core Concepts Graduate
| |
| Jean-Pierre Martel 2005-11-23, 11:23 am |
| In article <kWQK6tB8FHA.1228@news-server>, contact@c-4m.com says...
>
> How to disable left clic of the mouse?
Untested:
Function onLeftMouseDown
// nothing
return
Jean-Pierre Martel, editor
The dBASE Developers Bulletin
Blue Star dBASE Plus Core Concepts Graduate
| |
| Roland Wingerter 2005-11-23, 11:23 am |
| "4m" wrote
>
> I have two forms.
> Thirst form as entryfield. It call second form which as a listbox. When I
> right clic on the listbox a keyboard() function type the listbox value at
> the cursor of thirst form entryfield. OK that is running.
> But if the user LEFT CLIC on the listbox then the second form get focus
> and
> the first form entryfield as no more cursor.
------
This is a typical case for form communication.
One method of doing this is to open the second form with readModal() and
have it return a value.
Try the demo below. Save the two forms "formcommunication1.wfm" and
"listbox.wfm" to separate files, then start formcommunication1.wfm.
Roland
********************
********************
**********
** END HEADER -- do not remove this line
//
// Generated on 23.11.2005
//
parameter bModal
local f
f = new FormCommunication1Fo
rm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class FormCommunication1Fo
rm of FORM
with (this)
height = 5.0455
left = 28.1429
top = 1.5909
width = 69.0
text = "Form Communication with readModal()"
endwith
this.TEXTLABEL1 = new TEXTLABEL(this)
with (this.TEXTLABEL1)
height = 1.0
left = 3.0
top = 0.5
width = 10.0
text = "Textlabel1"
endwith
this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
height = 1.0
left = 14.0
top = 0.5
width = 35.0
value = ""
endwith
this.PB_SELECTVALUE = new PUSHBUTTON(this)
with (this.PB_SELECTVALUE)
onClick = class::PB_SELECTVALU
E_ONCLICK
height = 1.0909
left = 49.0
top = 0.5
width = 15.2857
text = "Select value..."
endwith
this.TEXTLABEL2 = new TEXTLABEL(this)
with (this.TEXTLABEL2)
height = 1.0
left = 5.0
top = 2.5
width = 60.0
text = "The child form will return a value"
endwith
function PB_SELECTVALUE_onCli
ck
set procedure to listbox.wfm addi
form.childform = new listboxform()
form.childform.mdi = false
form.entryField1.value = form.childForm.readModal()
return
endclass
********************
********************
**********
** END HEADER -- do not remove this line
//
// Generated on 23.11.2005
//
parameter bModal
local f
f = new listboxForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class listboxForm of FORM
with (this)
height = 12.0
left = 62.0
top = 2.2727
width = 24.2857
text = ""
endwith
this.LISTBOX1 = new LISTBOX(this)
with (this.LISTBOX1)
height = 8.0
left = 4.0
top = 1.0
width = 17.0
id = 101
dataSource = 'ARRAY
{"one","two","three","four","five","six","seven","eight","nine","ten"}'
endwith
this.PB_OKAY = new PUSHBUTTON(this)
with (this.PB_OKAY)
onClick = class::PB_OKAY_ONCLI
CK
height = 1.0909
left = 5.0
top = 10.0
width = 15.2857
text = "OK"
endwith
function PB_OKAY_onClick
form.close(form.listbox1.selected())
endclass
| |
|
| Thank you all
I must use form.parentform.entryfield1.keyboard( <listboxValue> ) in the
second form because I want the user to put the value exactly at the cursor
even in the middle of an existing value of the entryfield.
Now it run fine because I added this line in the second form:
form.parentform.entryfield1.keyboard( '{enter}' )
is it chance?
Etienne Gounon
|
|
|
|
|