0

Hello. I have a unique situation. I have so many text box's in my form that i wound up making a text box array. Now each text box i make i have to give it a mouse clicked event and mouse moved event. I cannot write these event functions for all of the text box's there would be too many. So i thaught i could just find out what text box has been clicked then in the events function iterate through the array of text box's and find out which one has been selected or not.

You might not have understood what im doing , but im simply looking for a textbox's selected variable. Its likely bool. I know check box's have a Checked value. It looks like this

this->checkbox1->Checked=true;

I need somthing like that but for a textbox, that will tell me weather or not it has been clikced on and highlighted. thanks all.

Edited by jonnyboy12

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Milton Neal
0

Once you right click on a textbox it has input focus.
So you can use its focused property (returns a bool value)

if(textbox1->Focused)
{
    ......
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.