Mike Mattys
mmattys at rochester.rr.com
Fri Apr 3 08:16:31 CDT 2009
Thanks, Shamil - Good! I have seen this syntax of {0}, {1}, but never used it. I also remember your comment about Imports Visual Basic, but I won't :) Your proposal on formats of forms and reports is good to me. - Michael R Mattys MapPoint and Database Dev www.mattysconsulting.com - ----- Original Message ----- From: "Salakhetdinov Shamil" <mcp2004 at mail.ru> To: "Discussion concerning Visual Basic and related programming issues." <dba-vb at databaseadvisors.com> Sent: Friday, April 03, 2009 6:17 AM Subject: Re: [dba-VB]SCRUM: 27 controls' OnClick event > Hi Mike, > > After you will run update have a look I have done some changes to your > form to hanle the three controls' Click event by one event procedure: > > in Customer_Phone_List_Load > ... > aLabel.Click += new EventHandler(letterLabel_Click); > bLabel.Click += new EventHandler(letterLabel_Click); > cLabel.Click += new EventHandler(letterLabel_Click); > ... > > private void letterLabel_Click(object sender, EventArgs e) > { > Label label = (Label)sender; > string filter = string.Format("Name LIKE '{0}*'", label.Tag); > this.customerBindingSource.Filter = filter; > } > > I have put filter letter in control's Tag to use it in a generic click > event event procedure to make a filter. > > Please also note I have made some design changes by putting gridview into > groupbox contaner, and I have also set Anchor property for some controls > to "automagicaly" and smoothly handle form resize... > > I'd also propose to change Label controls to button controls to enable Tab > navigation as well as hot-keys (ALT+A, ALT+B, ...)... > > As for some controls' styles - we haven't discuss it yet by the SCRUM > team - this is proposal for all the next forms/reports we develop: > > - use the same style for forms, reports, controls to have consistent look > & feel > > I'd propose now to discuss briefly and to define this common style - my > proposal is to use default WinForm controls styles as in sample forms we > have, and for reports use the same styles as are in ShippersReport.rdlc > > Thank you. > > -- > Shamil > > -----Original Message----- > From: "Mike Mattys" <mmattys at rochester.rr.com> > To: "Discussion concerning Visual Basic and related programming > issues."<dba-vb at databaseadvisors.com> > Date: Fri, 3 Apr 2009 00:53:07 -0400 > Subject: Re: [dba-VB] SCRUM: UDF's > >> Hi SCRUM Team, >> >> I have committed my version of the Customer Phone List >> >> The question I have is how does one go about using a single >> custom function for use by 27 controls' OnClick event ... >> I mean there's no = MyFunction() and there's no macros.