Heenan, Lambert
Lambert.Heenan at AIG.com
Mon Dec 22 11:57:46 CST 2003
Erwin, Here's an alternative approach. Instead of the users clicking or double clicking (and they will have to *remember* which action does what), why not give them a visual cue. By using the Mouse Move and Mouse Down events of a label control you can tell the user what's going to happen when they click on the label, like this... Const LeftCAPTION = "Do One Thing" Const RightCAPTION = "Do Another Thing" Private Sub Label2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Label2.Caption = LeftCAPTION Then MsgBox Label2.Caption ' simulate running one action Else MsgBox Label2.Caption ' or run another one depending on what the label's cation is. End If End Sub Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim sCaption As String ' figure out where the mouse is relative to the middle of the label control If X < Label2.Width / 2 Then sCaption = LeftCAPTION Else sCaption = RightCAPTION End If ' don't update the caption unless it has change - cuts out flickering If sCaption <> Label2.Caption Then Label2.Caption = sCaption End Sub HTH Lambert > -----Original Message----- > From: Erwin Craps - IT Helps [SMTP:Erwin.Craps at ithelps.be] > Sent: Monday, December 22, 2003 11:46 AM > To: Access Developers discussion and problem solving > Subject: RE: [AccessD] Click and double click on label. > > Is already the case. You still get the cursor. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mike & Doris > Manning > Sent: Monday, December 22, 2003 5:38 PM > To: 'Access Developers discussion and problem solving' > Subject: RE: [AccessD] Click and double click on label. > > If you don't want the Edit cursor, then set the Enabled property of your > textbox to YES and set the Locked property to YES. > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Erwin Craps - > IT Helps > Sent: Monday, December 22, 2003 11:31 AM > To: Access Developers discussion and problem solving > Subject: RE: [AccessD] Click and double click on label. > > > > I'm awaire of the sel... But the thing is that I still have a edit > cursor, which I dont want. I look a bit deeper in my single/double click > issue. > Apparently the single click get first executed when you double click and > afterwards the doubleclick event. I have the impression that as long as > code is running in the single click, the double click does not get > executed. Out of 10 times I double click, the double click event only > gets a couple times executed. (it's not a mouse double click timing > issue!!!). It must have something to do with the duration or the code in > the single click. > > I explain further what I wanna do. > > I have this form with 9 labels representing red/green lights. This form > is a embedded form on two other forms. Each label represents a day > (variable date). If data is present for this relation/day then the > background is green, if data is missing it's red. When I click on a > specific day the main > (parent) form gets filtered on that day. When I doubleclick I want > another form to open with the data of that day. Please note that on the > single click it filters data in a temporary table. With the double click > it open another form with reel data. > > The red/green light is always based on the real data. > > It's not that important, but it could make things a bit easyer Erwin > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, > Lambert > Sent: Monday, December 22, 2003 3:18 PM > To: 'Access Developers discussion and problem solving' > Subject: RE: [AccessD] Click and double click on label. > > Text1.SelStart = 0 > Text1.SelLength = 0 > ' That takes care of selecting text, but I don't think you can have a > single click event AND a double click event on any control. > > Lambert > > > > -----Original Message----- > > From: Erwin Craps - IT Helps [SMTP:Erwin.Craps at ithelps.be] > > Sent: Sunday, December 21, 2003 11:33 AM > > To: Access Developers discussion and problem solving > > Subject: RE: [AccessD] Click and double click on label. > > > > Tried that, > > > > Can't get by the selected text issue. > > If I click on a textcontrol it sets itself inside the text somewhere, > > or selects the whole text. > > > > Erwin > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Carlos > > Alberto Alves > > Sent: Sunday, December 21, 2003 3:39 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Click and double click on label. > > > > On Fri, 19 Dec 2003 17:23:46 +0100, Erwin Craps - IT Helps > > <Erwin.Craps at ithelps.be> wrote: > > > > > Why does my double click event not work on a label when I also have > > > a click event???? > > > > > > If I simply convert the label to a text control, it does work. But I > > > > cant use a text control because this give me another issue I don't > > > want. > > > > > > > Why don't you make your textbox "look like" a label (special effects, > > border style, border color, back style,...)? > > -- > > ************************************** > > * Carlos Alberto Alves * > > * Child Neurologist * > > * Systems Analyst/Programmer * > > * Rio de Janeiro, Brazil * > > * mailto:caa at highway.com.br * > > ************************************** > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com