When text in a text field is initially populated from the program (allowing a user override by a mouse down), the text appears difficult to read, not sharp and prominent like when the user actually types something in the field.
It appears when a text field is enabled, the text is sharp and clear, but when it is disabled, the text is muted.
Is there a place in Xojo to override this and make the text appear the same in a text field whether enabled or not? Leaving the field always enabled is not desirable in my program.
Is it reproducible in a simple project? If so, share that project.
I have never seen text being ânot sharpâ before.
Edit: It seems like maybe you donât quite know the correct words. Sharpness is how fuzzy something is or is not. This can be caused by using the wrong resolution graphics object. It seems more like simply mean the âdisabledâ look, which is not considered ânot-sharpâ.
Yes, a disabled control has lighter coloring to distinguish the fact that it is disabled.
It sounds like you have put the initial text in the âhintâ box, rather than the âTextâ field. The grey âhintâ is not a default value for the field it is a comment on how to complete the box. As such it is grey when shown. As soon as you click in it disappears and the user gets to enter their own text. The value of âhintâ is not returned to the program if the user doesnât enter anything.
Yes, Tim, I mean âdisabledâ. Thanks for the clarification.
I have an iMac I-7 running Mac OS Monterey 12.7.1.
So I guess to rephrase, is it possible to override the âdisabled controlâ lighter text or is that fixed in the Xojo OS? (Come to think of it, this is a much more sensible question once you get the right semantics!)
Enabled is aimed at a control that isnât currently relevant, ie a control that is greyed out because you arenât going to use the data it contains.
Read only is good for controls that are going to make a difference but the contents could come from other places, for example a summary of the settings youâve chosen with other controls. Obviously, If you set read only people canât click in the field and enter any data.
Spent several days swapping out the [Enabled] command with the [ReadOnly] command. As mentioned in the answers above, this change results in clear text in the fields on the screen. I also learned that I can have a [MouseDown] event in a Read Only field, then remove the restriction if the field is OK for user editing at that point.
Thanks to those who answered - my program is much more user-friendly as a result of this and the other answers I have gotten in this forum.
Ian, in my program, the user progresses through a number of text boxes entering information. I allow them to (1) restart the process by a MouseDown in the Date field (the first item to be entered). During data entry, TAB advances the user to the next field; and (2) I allow the user to use MouseDown to change a field they want to change.
Input by the user is evaluated each time a TAB is pressed; it must pass the âsmellâ test (Date must be validated for example; Amount must be within some bounds; and other tests). If the input is validated the TAB moves the user to the next entry point.
Some fields can be auto-filled based on user input. If the user knows a vendor number, for example, it is not necessary to enter the vendor name. That field can be populated automatically. But the user retains the ability to MouseDown on a field that they want to change without deleting the rest of their input (in my example, if the user overrides the computer generated Name field, the Vendor Number field would be automatically blanked out - or repopulated after a look-up in the Vendor file).
I am not a professional coder so there may be times when I violate what pros consider good practice; but I have 50 years in Accounting and Finance and know how to expedite data entry and improve accuracy.
At the end of the day, I write for my own use and not for sale, so any quirks in my approach are for my own - perhaps âselfishâ desires. Thanks for your comments as I like to be challenged on why I do things the way I do, and I like to consider the viewpoint of those who do this stuff for a living. For me itâs merely a hobby, and I learn more every day!
No problem. Just that some users almost never use a mouse and others almost always use one, and not the keyboard. It just sounded odd if the user could click on the field and edit bit not tab / shift-tab into it and do the same thing.