Subject Re: Data not visable
From Mervyn Bick <invalid@invalid.invalid>
Date Sun, 22 Mar 2020 10:31:14 +0200
Newsgroups dbase.getting-started

On 21/03/2020 21:37, Bob McKinney wrote:
>   I am still using DB2.8 w/W10(home).  I only progrm for my personal use. I have a new problem, when I place a new entryfield on a form (old or new), the field will accept date but you can't see it until you "save".  Then the data is visable and was entered in a table. I don't have a clue what caused the problem or haow to corect it.
>       Below is my code from "MyControls MyEntryField" :  Any help for this problem, greatly appreciated....Bob

I use dBASE 2019 but this should not affect the issue here.

Unfortunately I can't run your test form.  Although I can simply replace
the DMD and table with one of my own I don't have the .cfm or the .cc
you use.  I could use a standard form and controls but then it would be
MY test form and not YOUR test form. :-)

>   ********
> class MYENTRYFIELD(parentObj, name) of ENTRYFIELD(parentObj, name) custom
>     with (this)
> //      onGotFocus = {;this.keyboard( "}Home}" )}     //  ?

There is a typo which I assume is just a transcription error as it would
add }Home} to the text in the entryfield.  It should be {;this.keyboard(
"{Home}" )}

The event handler is actually redundant if you have the selectAll
property set false.

If selectAll were true (the default) tabbing to the control would select
all the text showing it a white on blue with the cursor at the end of
the text. The event handler then moves the cursor to the start of the
text thereby de-selecting it so that it displays using the
colorHighlight setting.

Clicking on the entryfield to give it focus doesn't select any text.
The event handler moves the cursor tothe beginning and then it moves
back to where the mouse was clicked.

With selectAll false tabbing to the entryfield leaves the cursor at the
beginning of the text and clicking on the entryfield leaves the cursor
at the clickpoint.

>        height = 5.0
>        left = 3.0
>        top = 1.5
>        width = 13.0
>        metric = 6        // Chars
>        colorHighLight = "white/Yellow"

White on yellow is very difficult to see. (Even with "young" eyes. :-) )
Try changing this to "white/red" as a test and see if this makes a

>        value = "MyEntryField"
>        selectAll = false  // This value was false, testing I
>          // changed to true, that did not help my problem

The default value for selectAll is true.  If the entryfield gets focus
by tabbing to it all the test is selected i.e displays as White text on
a Blue background.  If the entryfield gets focus by clicking on it
selectAll has no effect.