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.

well if they are an array don't you have one module that handles events for the textboxes in that array

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)
{
    ......
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.