Home > Archive > Programming with dBASE > October 2005 > numeric entry









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]

 

Author numeric entry
Tom Gormey

2005-10-17, 1:26 pm

We have just upgraded to version 2.6. The mode of operation of numeric entryfield seems to have changed and is causing user errors.

if user tab into the entryfield containing 1.00 box and type 3.99 they get 3.99. if they click on the field infront of the 1.00 and type 3.99 the result is 30.99. On the previous 0.2 version the result was 3.99). if they click after the 1 the result is 13
.99.

The behaviour is better if they rember to press the "insert" key i.e overtype. Can this behavour be altered/configured.

What i would like is that when you click in the field its contents get selected the same as if you tab into it.(I thought the "SelectAll" property might do this but it dosent seem to ). If you then click again in the field contents get deselected and them
they can insert/delete/overtype numbers in the entry field.
Marko Mihorko [dBVIPS]

2005-10-17, 1:26 pm

Hello Tom!

"Tom Gormey" je napisal v sporočilo...

> We have just upgraded to version 2.6. The mode of operation of numeric
> entryfield seems to have changed and is causing user errors.
>
> if user tab into the entryfield containing 1.00 box and type 3.99 they get
> 3.99. if they click on the field infront of the 1.00 and type 3.99 the result
> is 30.99. On the previous 0.2 version the result was 3.99). if they click
> after the 1 the result is 13.99.
>
> The behaviour is better if they rember to press the "insert" key i.e
> overtype. Can this behavour be altered/configured.
>
> What i would like is that when you click in the field its contents get
> selected the same as if you tab into it.(I thought the "SelectAll" property
> might do this but it dosent seem to ). If you then click again in the field
> contents get deselected and them they can insert/delete/overtype numbers in
> the entry field.


As usual mark/copy/paste/save everything below to a file named f.e. <Tom.wfm>
and later on doubleclick on it under the <Forms> tab of the <Navigator> window.

Then try if the typing as such behaves by any chance according to your wishes
expressed above (well, in any case, you will have to _doubleclick_ in order
to get the contents of the current entryfield "deselected"... ;-)

Marko Mihorko [dBVIPS]


set database to; close tables
if file('Tom_M.dbf'); drop table Tom_M
endif
create table Tom_M(tom1 numeric(8,2), tom2 numeric(12,2))
insert into Tom_M values (1,12.34)
** END HEADER -- do not remove this line
//
// Generated on 17.10.2005
//
parameter bModal
local f
f = new TomForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif

class TomForm of FORM
with (this)
text = "Tom - numeric entry"
endwith

this.TOM_M1 = new QUERY()
this.TOM_M1.parent = this
with (this.TOM_M1)
sql = 'select * from "Tom_M.DBF"'
active = true
endwith

this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
onLeftMouseUp = class::ENTRYFIELD_ON
LEFTMOUSEUP
dataLink = form.tom_m1.rowset.fields["tom1"]
left = 15.0
top = 3.5
endwith

this.ENTRYFIELD2 = new ENTRYFIELD(this)
with (this.ENTRYFIELD2)
onLeftMouseUp = class::ENTRYFIELD_ON
LEFTMOUSEUP
dataLink = form.tom_m1.rowset.fields["tom2"]
left = 15.0
top = 6.0
endwith

this.rowset = this.tom_m1.rowset

function ENTRYFIELD_onLeftMou
seUp(flags, col, row)
SendMessage(this.hwnd, 0x00B1, this.datalink.length - ;
('' + this.datalink.value).length, this.datalink.length)
return

function open
if type("SendMyMessage") # "FP"
extern CLONG SendMessage(CHANDLE,
CUINT,CUINT,CLONG) User32 ;
from "SendMessageA"
endif
return super::open()
endclass








Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com