Highlighting rows in Microsoft Flex Grid 
Author Message
 Highlighting rows in Microsoft Flex Grid

Hello all,
           I have a MSFlexGrid in FormView. I want to highlight a row
when the user right-clicks on that particular row so that, i can
display a context-menu along with it.

Settings are :-

Selection Mode - 1 (By Row)
Highlight - 2 (By Focus)
Focus Rect - 2 (Heavy)

When the user left-clicks on any row, that row is highlighted but, how
to higlight the row on right-click.

I tried this but, i vain ...

void CDTUView::OnMouseDownMsflexgrid(short Button, short Shift, long
x, long y)
{
        int row = m_Grid.GetMouseRow();

        if ( Button == MK_RBUTTON )
             m_Grid.SetRowSel(row);

Quote:
}

Any help in this regard would be appreciated.

Thanks,
ranjith



Tue, 26 Apr 2005 07:29:26 GMT  
 Highlighting rows in Microsoft Flex Grid
use the "OnMouseDown_xxxx" handler
then I used 1 for left button and 2 for the right button;

after that I used something like

//  m_NumProp.m_nRow = m_pGrid->GetRow();
//  m_NumProp.m_nCol = m_pPGrid->GetCol();

make sure you've implemented message reflection or event sink map with
something
like
 DECLARE_EVENTSINK_MAP()


Quote:
> Hello all,
>            I have a MSFlexGrid in FormView. I want to highlight a row
> when the user right-clicks on that particular row so that, i can
> display a context-menu along with it.

> Settings are :-

> Selection Mode - 1 (By Row)
> Highlight - 2 (By Focus)
> Focus Rect - 2 (Heavy)

> When the user left-clicks on any row, that row is highlighted but, how
> to higlight the row on right-click.

> I tried this but, i vain ...

> void CDTUView::OnMouseDownMsflexgrid(short Button, short Shift, long
> x, long y)
> {
>         int row = m_Grid.GetMouseRow();

> if ( Button == MK_RBUTTON )
>              m_Grid.SetRowSel(row);

> }

> Any help in this regard would be appreciated.

> Thanks,
> ranjith



Tue, 26 Apr 2005 10:36:27 GMT  
 Highlighting rows in Microsoft Flex Grid
What Control is m_NumProp. I would like to clarify that what behaviour
one gets by left-clicking on a FlexGid (Which happens by default), I
want the same behaviour when the user right-clicks on the grid i.e
highlighting the row that has been clicked.

Thanks in advance,
ranjith

Quote:

> use the "OnMouseDown_xxxx" handler
> then I used 1 for left button and 2 for the right button;

> after that I used something like

> //  m_NumProp.m_nRow = m_pGrid->GetRow();
> //  m_NumProp.m_nCol = m_pPGrid->GetCol();

> make sure you've implemented message reflection or event sink map with
> something
> like
>  DECLARE_EVENTSINK_MAP()



> > Hello all,
> >            I have a MSFlexGrid in FormView. I want to highlight a row
> > when the user right-clicks on that particular row so that, i can
> > display a context-menu along with it.

> > Settings are :-

> > Selection Mode - 1 (By Row)
> > Highlight - 2 (By Focus)
> > Focus Rect - 2 (Heavy)

> > When the user left-clicks on any row, that row is highlighted but, how
> > to higlight the row on right-click.

> > I tried this but, i vain ...

> > void CDTUView::OnMouseDownMsflexgrid(short Button, short Shift, long
> > x, long y)
> > {
> >         int row = m_Grid.GetMouseRow();

> > if ( Button == MK_RBUTTON )
> >              m_Grid.SetRowSel(row);

> > }

> > Any help in this regard would be appreciated.

> > Thanks,
> > ranjith



Wed, 27 Apr 2005 05:42:17 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MS Flex Grid

2. Combo over Flex Grid in ATL composite control

3. Events of Flex grid not being handled in ATL composite control

4. Flex Grid and Edit Control

5. ms flex grid?

6. how to put checkboxes in MS Flex Grid

7. MS Flex Grid control

8. ms flex grid

9. Flex Grid

10. ms flex grid?

11. MS Flex Grid & WM_KEYDOWN

12. ActiveX Flex Grid control - inputing graphics ?

 

 
Powered by phpBB® Forum Software