Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiline text not displayed correctly in text box Pin
Luis Alonso Ramos16-Oct-04 21:23
Luis Alonso Ramos16-Oct-04 21:23 
GeneralRe: Multiline text not displayed correctly in text box Pin
Heath Stewart16-Oct-04 21:31
protectorHeath Stewart16-Oct-04 21:31 
GeneralRe: Multiline text not displayed correctly in text box Pin
Luis Alonso Ramos16-Oct-04 21:58
Luis Alonso Ramos16-Oct-04 21:58 
GeneralRe: Multiline text not displayed correctly in text box Pin
Heath Stewart16-Oct-04 22:13
protectorHeath Stewart16-Oct-04 22:13 
GeneralNo validation events when clicking on a toolbar Pin
Luis Alonso Ramos16-Oct-04 12:33
Luis Alonso Ramos16-Oct-04 12:33 
GeneralRe: No validation events when clicking on a toolbar Pin
Alex Korchemniy16-Oct-04 15:01
Alex Korchemniy16-Oct-04 15:01 
GeneralRe: No validation events when clicking on a toolbar Pin
Luis Alonso Ramos16-Oct-04 15:49
Luis Alonso Ramos16-Oct-04 15:49 
GeneralRe: No validation events when clicking on a toolbar Pin
Heath Stewart16-Oct-04 20:58
protectorHeath Stewart16-Oct-04 20:58 
The ToolBar class in the BCL - and most other third-party toolbars I've seen - never gain the focus.

You need to invoke validation when a button is clicked. Since the ToolBar class in the BCL fires a single event for any button click, it makes it easy to do this: just call the function that implements your functionality before checking which button was clicked (well, in most cases I would imagine).

How do you implement this? There are several ways, such as recursively enumerating your Controls collection for each Control (starting at your Form, UserControl, or whatever control you're extending or using for your container) and check the Focused property defined by the Control class (so every control has it, but they may not implement it - like the Panel class).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: No validation events when clicking on a toolbar Pin
Luis Alonso Ramos16-Oct-04 22:07
Luis Alonso Ramos16-Oct-04 22:07 
GeneralRe: No validation events when clicking on a toolbar Pin
Luis Alonso Ramos18-Oct-04 14:02
Luis Alonso Ramos18-Oct-04 14:02 
GeneralRe: No validation events when clicking on a toolbar Pin
Heath Stewart18-Oct-04 14:04
protectorHeath Stewart18-Oct-04 14:04 
GeneralRe: No validation events when clicking on a toolbar Pin
Luis Alonso Ramos18-Oct-04 14:23
Luis Alonso Ramos18-Oct-04 14:23 
GeneralRe: No validation events when clicking on a toolbar Pin
Heath Stewart18-Oct-04 16:08
protectorHeath Stewart18-Oct-04 16:08 
GeneralRe: No validation events when clicking on a toolbar Pin
Luis Alonso Ramos19-Oct-04 6:03
Luis Alonso Ramos19-Oct-04 6:03 
GeneralRe: No validation events when clicking on a toolbar Pin
Heath Stewart19-Oct-04 7:14
protectorHeath Stewart19-Oct-04 7:14 
GeneralRe: No validation events when clicking on a toolbar Pin
Luis Alonso Ramos19-Oct-04 7:39
Luis Alonso Ramos19-Oct-04 7:39 
GeneralGetting active MdiChild Pin
Luis Alonso Ramos16-Oct-04 12:29
Luis Alonso Ramos16-Oct-04 12:29 
GeneralRe: Getting active MdiChild Pin
Alex Korchemniy16-Oct-04 14:45
Alex Korchemniy16-Oct-04 14:45 
GeneralRe: Getting active MdiChild Pin
Luis Alonso Ramos16-Oct-04 15:17
Luis Alonso Ramos16-Oct-04 15:17 
Generalsearch mechanism Pin
mathon16-Oct-04 9:56
mathon16-Oct-04 9:56 
GeneralRe: search mechanism Pin
Alex Korchemniy16-Oct-04 11:15
Alex Korchemniy16-Oct-04 11:15 
GeneralRe: search mechanism Pin
mathon16-Oct-04 13:06
mathon16-Oct-04 13:06 
GeneralRe: search mechanism Pin
Alex Korchemniy16-Oct-04 14:36
Alex Korchemniy16-Oct-04 14:36 
GeneralRe: search mechanism Pin
mathon16-Oct-04 22:22
mathon16-Oct-04 22:22 
GeneralRe: search mechanism Pin
mathon16-Oct-04 22:29
mathon16-Oct-04 22:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.