home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,944 of 10,840   
   Randy Birch to All   
   Re: MSFlex Grid Control - Fixed Rows   
   08 Mar 06 19:51:44   
   
   XPost: comp.lang.basic.visual   
   From: rgb_removethis@mvps.org   
      
   ????   
      
   You say you want to sort when the user clicks a column in the fixed row   
   (which is the row across the top of the control), then go on to say you are   
   capturing the row number in the click event which will always be (correctly)   
   1 because clicking the header selects the entire column and moves the focus   
   rectangle to the first work row (the row 1 you mention).   
      
   If you want to determine the column clicked when a header in the top fixed   
   row is clicked, all you need is:   
      
   Private Sub MSFlexGrid1_MouseDown(...   
      If MSFlexGrid1.Row = 1 Then   
         Debug.Print MSFlexGrid1.Col   
      End If   
   End Sub   
      
      
   Similarly the reverse holds true for detecting the row clicks when the row   
   fixed header is clicked:   
      
   Private Sub MSFlexGrid1_MouseDown(...   
      If MSFlexGrid1.Col= 1 Then   
         Debug.Print MSFlexGrid1.Row   
      End If   
   End Sub   
      
   --   
      
   Randy Birch   
   MS MVP Visual Basic   
   http://vbnet.mvps.org/   
      
   Please reply to the newsgroups so all can participate.   
      
      
      
      
   "Otie"  wrote in message   
   news:SI6dnTgnkpTEo5LZRVn-sw@adelphia.com...   
   Hello,   
      
   I am using the MSFlexGrd Control in VB5. I have 1 fixed row and one fixed   
   column. I am trying to do a sort when the user clicks a column in the FIXED   
   ROW. But when I capture the row number in the click event I get row = 1 if I   
   click on the FIXED row OR the actual row 1. How can I get the grid control   
   to tell me when the user has clicked on the FIXED row and not on row 1   
   (since they both produce row = 1 and I cannot tell them apart when it does   
   this)?   
      
   Thank you.   
      
      
   Otis   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca