|
-
Jun 2nd, 2023, 03:17 AM
#1
Thread Starter
Hyperactive Member
Windows form (and controls) focus question
Hi all, O7.
Consider you want to double click on a line through lots of lines and you want the software to get you on the corresponding control location and tells you "here it is" with no words. Kind of flicker it once or twice. Formerly we focus the control but not all of them respond as obvious as text boxes. What I need is much like "emphasis" reaction on a dialogbox where despite clicking somewhere else is prohibited but it "dings" and attracts all user's attention to its flickers a short time. (What does thing even called?)
Ho can we achieve such behavior?
-
Jun 2nd, 2023, 04:43 AM
#2
Re: Windows form (and controls) focus question
Hi Puka O7.
What is a line?
If it has properties that you can set them maybe...
Create an array and map the controls by p.e. name.
Manage the specific lines you want to navigate to controls. When line click access the control from Form.Controls and the do what you want to the control.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jun 2nd, 2023, 05:09 AM
#3
Thread Starter
Hyperactive Member
Re: Windows form (and controls) focus question
 Originally Posted by sapator
Puka
Esy eisai pali...
Lines like items of a ListBox or rows of a DataGridView, as you double click on them based on their containing value, the goal is to direct you to a specific control and perform flicker on them.
-
Jun 2nd, 2023, 05:29 AM
#4
Re: Windows form (and controls) focus question
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jun 2nd, 2023, 12:16 PM
#5
Re: Windows form (and controls) focus question
You need to be more specific. Different controls would have different methods. If it was a Combobox I'd store the control name in the Selected value property. You could draw attention to the control by blinking it a few times. That's easily done using a timer.
-
Jun 2nd, 2023, 09:49 PM
#6
Re: Windows form (and controls) focus question
For the drawing attention to a control, alternating two states would be done with a Timer, as suggested above. You would Start the Timer and, on each Tick, you would toggle the state. It's completely up to you what that state is. You might change the BackColor but any visual property might do the job. The smaller the Interval you use, the quicker the toggling would take place. You would count the number of Tick events and then Stop the Timer after an appropriate number, e.g. 6.
As for how to specify the control to focus and perform the toggling on, that really depends on the source, as suggested. You need to be far more specific about what you actually have and what you're actually trying to achieve. If there were some common mechanism for this, you probably wouldn't have had to ask the question in the first place. The control you're clicking, the data it contains and how that relates to the target control is all important information.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|