Home All Groups Group Topic Archive Search About

Use ColumnClick and Click Event in MSHFLexGrid

Author
8 Dec 2008 9:43 AM
catharinus
Hello

I want to use the colulmnclick and the click event in MSHFLexGRid.
They can both be initiated through the sub MSHFlexGrid1_Click.
But I want to have the click-event act difrerent from the Columnclick
event. How can I distinguish these two actions?
Thanks

Catharinus van der Werf
csvanderw***@planet.nl

Author
8 Dec 2008 10:45 AM
Eduardo
Use the MouseUp event instead of the Click event:

Private Sub MSHFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As
Single, y As Single)
    If y < MSHFlexGrid1.RowHeight(MSHFlexGrid1.FixedRows - 1) Then
        ' "ColumnClick"
    Else
        ' Click
    End If
End Sub


Show quoteHide quote
"catharinus" <csvanderw***@planet.nl> escribió en el mensaje
news:062553e1-4269-49f8-b2dd-8594fca07c81@s20g2000yqh.googlegroups.com...
> Hello
>
> I want to use the colulmnclick and the click event in MSHFLexGRid.
> They can both be initiated through the sub MSHFlexGrid1_Click.
> But I want to have the click-event act difrerent from the Columnclick
> event. How can I distinguish these two actions?
> Thanks
>
> Catharinus van der Werf
> csvanderw***@planet.nl
Author
8 Dec 2008 12:36 PM
catharinus
Show quote Hide quote
On 8 dec, 11:45, "Eduardo" <m***@mm.com> wrote:
> Use the MouseUp event instead of the Click event:
>
> Private Sub MSHFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As
> Single, y As Single)
>     If y < MSHFlexGrid1.RowHeight(MSHFlexGrid1.FixedRows - 1) Then
>         ' "ColumnClick"
>     Else
>         ' Click
>     End If
> End Sub
>
> "catharinus" <csvanderw***@planet.nl> escribió en el mensajenews:062553e1-4269-49f8-b2dd-8594fca07***@s20g2000yqh.googlegroups.com...
>
>
>
> > Hello
>
> > I want to use the colulmnclick and the click event in MSHFLexGRid.
> > They can both be initiated through the sub MSHFlexGrid1_Click.
> > But I want to have the click-event act difrerent from the Columnclick
> > event. How can I distinguish these two actions?
> > Thanks
>
> > Catharinus van der Werf
> > csvanderw***@planet.nl- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

He Eduardo
Thanks
That's it

Catharinus van der Werf
csvanderw***@planet.nl
Author
8 Dec 2008 12:55 PM
Eduardo
Reading again my post, I see that there is a problem with my code. Here is
the right code:

Private Sub MSHFlexGrid1_MouseUp(Button As Integer, Shift As Integer, _
  x As Single, y As Single)
    If y < MSHFlexGrid1.RowPos(MSHFlexGrid1.FixedRows) Then
        MsgBox "ColumnClick"
    Else
        MsgBox "Click"
    End If
End Sub

The other code will work only if there is just one fixed row  (that usually
it is the case).


Show quoteHide quote
"catharinus" <csvanderw***@planet.nl> escribió en el mensaje
news:2b110472-99d9-4b7c-9a24-cdbee2433cb6@a12g2000yqm.googlegroups.com...
On 8 dec, 11:45, "Eduardo" <m***@mm.com> wrote:
> Use the MouseUp event instead of the Click event:
>
> Private Sub MSHFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As
> Single, y As Single)
> If y < MSHFlexGrid1.RowHeight(MSHFlexGrid1.FixedRows - 1) Then
> ' "ColumnClick"
> Else
> ' Click
> End If
> End Sub
>
> "catharinus" <csvanderw***@planet.nl> escribió en el
> mensajenews:062553e1-4269-49f8-b2dd-8594fca07***@s20g2000yqh.googlegroups.com...
>
>
>
> > Hello
>
> > I want to use the colulmnclick and the click event in MSHFLexGRid.
> > They can both be initiated through the sub MSHFlexGrid1_Click.
> > But I want to have the click-event act difrerent from the Columnclick
> > event. How can I distinguish these two actions?
> > Thanks
>
> > Catharinus van der Werf
> > csvanderw***@planet.nl- Tekst uit oorspronkelijk bericht niet
> > weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

He Eduardo
Thanks
That's it

Catharinus van der Werf
csvanderw***@planet.nl