Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can i change runtime the appearance of my cursos?

Status
Not open for further replies.

ShortyII

Programmer
Sep 8, 2003
57
NL
Hi,

I want to change the appearance of my cursor runtime.
Now its standard | and black.
I would like to change the color or if possible the size to #.

Thanx
 
ShortyII,

If it is the mouse pointer that you want to change, you can do so by altering the MousePointer or MouseIcon properties.

If it is the insertion point that you want to change, that's not possible within VFP (although you might be able to change the hieght of the insertion point through control panel, but I'm not sure).

Mike


Mike Lewis
Edinburgh, Scotland
 
It's not the mouse pointer but the cursor in a text field
 
I just checked control panel ... can't see any obvious setting there.

The height of the insertion point seems to depend on the size of the font, which seems reasonable. ShortyII, why do you want to change it?

Mike


Mike Lewis
Edinburgh, Scotland
 
I want to change it so that i the users can follow there cursos when using tab.
Now if you push tab you have to search the screen to see where the cursor is and by making him bigger ot another colour this should be easier.
 
i enabled the SelectonEntry option but i don't see any difference. Wath should happen ?
 
The "cursor" you refer to, is actually called the caret in Windows. This is can only be changed with the appropriate Win32 API calls - there is no native capability in VFP (at least not any version so far). For better idenitfication of the current field on the form, many will set the Selected property on in text fields, or they will change the background and foreground colors to something contrasting in the GotFocus() and LostFocus() methods. If this will satisfy your requirements, it's easy to put the code in your textbox base class.

Rick
 
I have selectOnEntry Enabled but i see no difference do i have to change somthing more the highlight colour?

"If this will satisfy your requirements, it's easy to put the code in your textbox base class."
How can i do this ?? do you have the code for this?? and can i select the colours that will be used??

Thanx for the help
 
ShortyII,

SelectOnEntry works when the user tabs to a field (not when they click on it with the mouse). Is that what you were doing? Also, check that the BackColor and SelectedBackColor properties are at their default settings.

The technique that Rick was referring to involves writing code in the textbox's GotFocus. This code wil change the appearance of the field in some way to highlight the fact that it has focus. For example, you could change the BackColor or the BorderColor, or make the text bold by setting FontBold to .T. It is up to you to experiment to get the settings that look right for your form.

Whatever change you make in the GotFocus, be sure to put it back to normal in the LostFocus.

Mike


Mike Lewis
Edinburgh, Scotland
 
Now i see wath you mean.
When there is text in the textbox then i will or will not light up.
Now is the case that i have textboxes that are empty! and those i also want to light UP
 
ShortyII,

That's right --- SelectOnEntry doesn't do anything with empty textboxes. For those cases, you will have to use one of the other techniques that Rick and I mentioned, such as changing the BackColor.

Mike


Mike Lewis
Edinburgh, Scotland
 
Now i don't want to put the code in all off the textboxes i have already on my forms.

Rick wrote:
If this will satisfy your requirements, it's easy to put the code in your textbox base class.

If i change it in the base class does it change also all the boxes i already used?
 
ShortyII,

I was assuming you had already created a base textbox class, on which all your individual text boxes were based. If you haven't, there is no easy way of applying a property value to every text box in your application.

Mike


Mike Lewis
Edinburgh, Scotland
 
As Mike suggests, the first rule in VFP, is to NEVER use the VFP base classes directly - always use at least one level of subclassing. There are a number of utilities around that will generate a set of subclasses you can use as your "base" using the VFP base classes. Check the UT VFP Download area ( or I have used Geeks and Guru's subclasser - Class Library Subclasser. Note: I don't know if any of these have been updated for VFP 8.0, but that should be a minor change.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top