So lets say I have a Panel. Inside of it there is a Button and TextBox. I can reach those controls' control with panel.Controls[index] with this way.
I am trying to reach panel with reverse way. I mean lets say I click the textbox inside of panel. And the active control of form became the textbox. Is there any possible way to reach that panel with active control?
Panel -> Textbox instead of Active Control -> Panel
Thanks
Related
I have prepared one dropdown user control with a searching feature using textbox, panel, and checked listview.
when I click on down arrow PictureBox or in the displayed textbox, the listview panel will open as dropdown, and based on the mouse click I hiding and showing checked listview panel.
Now, when I put my user control within any panel and an open dropdown that time my user control's listview panel is going backside of the parent control/panel as I shown in the screen.
Please Help me.
I have a user control that have a number of textboxes and comboboxes contained in it. These user controls are programmatically created and placed on a form. The final user of this application want the ability to press enter an instead of going to the next child control in the usercontrol, they want to go to the equivilent textbox in the next usercontrol.
So essentially i want "Enter" to take focus from usercontrol1.textbox1 and place it in usercontrol2.textbox1.
I am creating an application in which i have a user control that can be added by user dynamically any number of times. Form also contains some other controls.
Suppose he has added the control 10 times.
Requirement:
1) When the control is selected, it should be highlighted and when the
other control is selected then the previous control looses the glow.
2) User can select multiple controls at the same time. Now all the
selected controls should be highlighted and the selection has to be
made with ctrl key.
There is also a possibility of moving the controls on the form.
What I have achieved:
1) I am able to add multiple controls dynamically.
2) I can change the location of one control dynamically.
3) I am able to highlight the control when it is clicked, but not able
to un-glow it when user has clicked elsewhere. Need to know which event of User control can be used for that. -- Got the solution for this. On mouse click i made the focus on the control and then handle GotFocus and Lost Focus events to golw and un-glow the control.
Problem Left:
No success in selecting multiple controls and dragging them
simultaneously. If i would be able to select multiple controls then
dragging would not be very difficult.
If you are talking about buttons, unfortunately you cant select multiple at a time..
I have a tabcontrol with multiple tabs and I want a panel that shows progress bar to be visible whenever user is processing something and be hidden when the processing has completed.
I added that panel in first tab of the tabcontrol. However, now the panel will only be visible when user selects the first tab but disappears when user selects other tabs.
I want the panel to display when user selects other tabs. How can I do that?
Is there something wrong with putting it outside the TabControl?
I hope you talk about WPF, if so, wrap the TabControl in a grid
give the grid 2 childs first tb control second the progress bar, whenever you set the progress bar visibility to visible it'll be on top of screen.
After you click outside the drop down, it seems the focus is still on the drop down; scrolling, you select (without knowing) another value.
I want to lose the focus while clicking on the tab control or any location of the page.
As Otiel commented, click outside ComboBox won't make it lose the focus.
You can handle the Click event for the container (eg. a Panel) of your ComboBox and set the Focus to other control by using Control.Focus Method.