mouse click into input field - 3/fmt(99) vs 3/c 2
Moderators: Susan Smith, admin, Gabriel
mouse click into input field - 3/fmt(99) vs 3/c 2
BR 4.18i Windows, & Mac versions:
Is there any way to control the position of the cursor when clicking into an input field with fmt(99)?
When using input field fmt - the mouse pointer position seems to control where the cursor ends up, even if it is only a 2 position field.
Clicking into a Character input field - the cursor position is always at the start (left) in the input field.
Clicking into a Fmt input field, the cursor could be either at the start or the end of the input field, depending on where the mouse pointer is when the click occurs.
I want to use fmt(99), because this is more powerful, and rejects any input that is not numeric. (takes less code too)
Having the cursor end up at the end of the input field is not desireable and users think the field is locked, or a bug in the program.
I consider this a bug in BR.
Any suggestions?
Sample program to run:
00010 ! repl inp_fmt.wb ! testing mouse, cursor position when clicking into an input field
00020 Print NEWPAGE
00030 Dim FMT$*2,CAR$*2
00040 Let FMT$=CAR$=" "
00050 Print #0,Fields "5,10,c 70": "Test cursor position by clicking into input field"
00060 Print #0,Fields "8,2,c 20": "Input 3/fmt(99) fld"
00070 Print #0,Fields "9,2,c 20": "Input 3/c 2 fld"
00080 Rinput Fields "8,26,3/fmt(99),[d]T;9,26,3/c 2,[d]T": FMT$,CAR$
00090 Print #0,Fields "15,4,c": "If on 2nd fld and click into fmt field, the cursor position is important"
00100 Print #0,Fields "16,1,c": "clicking into the middle of the fmt fld, the cursor is at the end of the fld"
00110 Print #0,Fields "17,1,c": "if you position the mouse in the left of the fmt fld, the cursor is at the start"
00120 Goto 80
Is there any way to control the position of the cursor when clicking into an input field with fmt(99)?
When using input field fmt - the mouse pointer position seems to control where the cursor ends up, even if it is only a 2 position field.
Clicking into a Character input field - the cursor position is always at the start (left) in the input field.
Clicking into a Fmt input field, the cursor could be either at the start or the end of the input field, depending on where the mouse pointer is when the click occurs.
I want to use fmt(99), because this is more powerful, and rejects any input that is not numeric. (takes less code too)
Having the cursor end up at the end of the input field is not desireable and users think the field is locked, or a bug in the program.
I consider this a bug in BR.
Any suggestions?
Sample program to run:
00010 ! repl inp_fmt.wb ! testing mouse, cursor position when clicking into an input field
00020 Print NEWPAGE
00030 Dim FMT$*2,CAR$*2
00040 Let FMT$=CAR$=" "
00050 Print #0,Fields "5,10,c 70": "Test cursor position by clicking into input field"
00060 Print #0,Fields "8,2,c 20": "Input 3/fmt(99) fld"
00070 Print #0,Fields "9,2,c 20": "Input 3/c 2 fld"
00080 Rinput Fields "8,26,3/fmt(99),[d]T;9,26,3/c 2,[d]T": FMT$,CAR$
00090 Print #0,Fields "15,4,c": "If on 2nd fld and click into fmt field, the cursor position is important"
00100 Print #0,Fields "16,1,c": "clicking into the middle of the fmt fld, the cursor is at the end of the fld"
00110 Print #0,Fields "17,1,c": "if you position the mouse in the left of the fmt fld, the cursor is at the start"
00120 Goto 80
Option 53: Allow mouse positioning inside a field other than the current field. Without this Option clicking anywhere in a non-current active input field will process it as though the field were entered via the arrow keys.
I want just the opposite of Option 53. I want the mouse click to act as an arrow key when going into an input field with fmt(99), or position the cursor at the start of the input field.
The input fmt field is acting like Option 53 is ON, even when it is not.
That is one reason I believe there is a bug with input fmt flds, as it relates to clicking into the field with the mouse.
I want just the opposite of Option 53. I want the mouse click to act as an arrow key when going into an input field with fmt(99), or position the cursor at the start of the input field.
The input fmt field is acting like Option 53 is ON, even when it is not.
That is one reason I believe there is a bug with input fmt flds, as it relates to clicking into the field with the mouse.
BR 4.18i as stated in the original post
Brconfig.sys
DRIVE z:,z:,z:,\mapp2
WBSERVER \mapp2
WORKPATH \mapp2
WSID=Unique
REM - SUBSTITUTE SECTION
SUBSTITUTE \MACPRG,\mapp2\MACPRG
SUBSTITUTE [IMG],\mapp2\macprg\IMG
REM - KEYBOARD ASSIGNMENTS
rem KEYBOARD 0001,00010067006F0020004300540052004C005F0043000D
KEYBOARD 000F,002D ! MINUS, MINUS SIGN
TYPEAHEAD ON
INSERT OFF
REM - GRAPHICS SECTION
GUI ON
3D_FIELDS ON
DATAHILITE ON
REM WINDOWS DEFAULT
GRAPHIC_LINEDRAW ON
GRAPHIC_LINEDRAW THINRAISED
SCREEN OPENDFLT SROW=1,SCOL=1,rows=30,cols=80,Picture=[IMG]\mtst1.jpg,CAPTION=MAPP2 Testing,MAXIMIZE
USERLEVEL 1
STYLE INDENT 4 KEYWORDS MIXED LABELS UPPER EXPRESSIONS UPPER COMMENTS LOWER
REM - SYSTEM PARAMETERS
FILENAMES LOWER_CASE ! 7/08/08 WINDOWS & MAC
STATUSLINE ON
MAXRECALL 200
BASEYEAR 1950
WORKSTACK 64000
FORSTACK 400
FLOWSTACK 1000
RPNSTACK 1500
MEMORY
REM - CLIENT/SERVER
CLIENT_CURRENT_DIR /MAPPCS/
rem mac /
SHELL DEFAULT SERVER
OPTION 29
OPTION 35
INCLUDE GUICOLOR.SYS ! WINDOWS VERSION COLORS, FONTS
include wsid.sys
include printer.sys
Brconfig.sys
DRIVE z:,z:,z:,\mapp2
WBSERVER \mapp2
WORKPATH \mapp2
WSID=Unique
REM - SUBSTITUTE SECTION
SUBSTITUTE \MACPRG,\mapp2\MACPRG
SUBSTITUTE [IMG],\mapp2\macprg\IMG
REM - KEYBOARD ASSIGNMENTS
rem KEYBOARD 0001,00010067006F0020004300540052004C005F0043000D
KEYBOARD 000F,002D ! MINUS, MINUS SIGN
TYPEAHEAD ON
INSERT OFF
REM - GRAPHICS SECTION
GUI ON
3D_FIELDS ON
DATAHILITE ON
REM WINDOWS DEFAULT
GRAPHIC_LINEDRAW ON
GRAPHIC_LINEDRAW THINRAISED
SCREEN OPENDFLT SROW=1,SCOL=1,rows=30,cols=80,Picture=[IMG]\mtst1.jpg,CAPTION=MAPP2 Testing,MAXIMIZE
USERLEVEL 1
STYLE INDENT 4 KEYWORDS MIXED LABELS UPPER EXPRESSIONS UPPER COMMENTS LOWER
REM - SYSTEM PARAMETERS
FILENAMES LOWER_CASE ! 7/08/08 WINDOWS & MAC
STATUSLINE ON
MAXRECALL 200
BASEYEAR 1950
WORKSTACK 64000
FORSTACK 400
FLOWSTACK 1000
RPNSTACK 1500
MEMORY
REM - CLIENT/SERVER
CLIENT_CURRENT_DIR /MAPPCS/
rem mac /
SHELL DEFAULT SERVER
OPTION 29
OPTION 35
INCLUDE GUICOLOR.SYS ! WINDOWS VERSION COLORS, FONTS
include wsid.sys
include printer.sys
maybe you want:
config datahilite off
when i click in the fields (using your config and your version of br!) my cursor goes to between the characters i clicked between or in front of or behind.
it does seem odd that when i do so - by default the field is selected from the start of the field to my cursor. the datahitlite off will take care of that.
sorry i can't help more - i think i'm not fully understanding the issue.
-john
config datahilite off
when i click in the fields (using your config and your version of br!) my cursor goes to between the characters i clicked between or in front of or behind.
it does seem odd that when i do so - by default the field is selected from the start of the field to my cursor. the datahitlite off will take care of that.
sorry i can't help more - i think i'm not fully understanding the issue.
-john
OH I SEE What's going on. you want the cursor to always start at the left of the field.
use
config option 53 off
(or just never change it from that state)
and change your line 80 to
00080 Rinput Fields "8,26,3/fmt(99),[d]T1;9,26,3/c 2,[d]T": FMT$,CAR$
while the behavior you found of fmt not properly respecting option 53 may indeed be a bug. The bold 1 added to line 80 above will tell BR to position the cursor in the 1st position everytime the fields gets focus. Thusly giving you the behavior you want to have today.
I believe this will help you.
-John
use
config option 53 off
(or just never change it from that state)
and change your line 80 to
00080 Rinput Fields "8,26,3/fmt(99),[d]T1;9,26,3/c 2,[d]T": FMT$,CAR$
while the behavior you found of fmt not properly respecting option 53 may indeed be a bug. The bold 1 added to line 80 above will tell BR to position the cursor in the 1st position everytime the fields gets focus. Thusly giving you the behavior you want to have today.
I believe this will help you.
-John
I don't believe the T is significant with respect to cursor positioning within a field.
The number has been a leading attribute in BR as long as I can remember (not too long lately). It denotes which position the cursor should start at.
It is described on the Screen Attributes page which is here:
http://brwiki.ads.net/index.php?title=Screen_Attribute
The number has been a leading attribute in BR as long as I can remember (not too long lately). It denotes which position the cursor should start at.
It is described on the Screen Attributes page which is here:
http://brwiki.ads.net/index.php?title=Screen_Attribute