Visual Basic, MSFlexGrid 
Author Message
 Visual Basic, MSFlexGrid

Does anyone have experience of working with these? Is there a simple way to
detect EXACTLY which cells a user has selected and whether they wish to
edit these cells or simply manipulate them??

I need to know if a user has selected distinct rows and then to be able to
delete these (AND undo/redo these actions), not trivial matters.  The user
also needs to be able to cut,copy and paste any number of rows.

Help!!!!




Fri, 28 Jul 2000 03:00:00 GMT  
 Visual Basic, MSFlexGrid

1) "Is there a simple way to detect EXACTLY which cells a user has selected"

Yes, through four properties: COL, COLSEL, ROW and ROWSEL. The currently
selected cell is at coordinates "COL,ROW" -- the selection area is the range
of cells between that position and coordinates "COLSEL,ROWSEL"  As must be
obvious from this, only rectangular selections are possible (i.e. this is
different from excel, for instance, where selection of multiple
non-contiguous ranges is possible).

2) "Is there a simple way to detect whether they wish to edit these cells or
simply manipulate them??"

Is there EVER a simple way to detect a user's intentions? AFAIK, no. You
have to be ready and able to respond to both conditions on the fly. If they
edit, then that's what they intended; if they simply manipulate, then that's
what they intended.

Hope this helps!


Quote:
>Does anyone have experience of working with these? Is there a simple way to
>detect EXACTLY which cells a user has selected and whether they wish to
>edit these cells or simply manipulate them??

>I need to know if a user has selected distinct rows and then to be able to
>delete these (AND undo/redo these actions), not trivial matters.  The user
>also needs to be able to cut,copy and paste any number of rows.

>Help!!!!





Fri, 28 Jul 2000 03:00:00 GMT  
 Visual Basic, MSFlexGrid



Quote:
>Does anyone have experience of working with these? Is there a simple way to
>detect EXACTLY which cells a user has selected and whether they wish to
>edit these cells or simply manipulate them??

Depend what you mean by simple.

The row,col,rowsel,colsel tell you (and allow you to set) selections.
There's no built in editing so it's done in code and the VB Books On
Line has a section "MsFlexGrid Control Scenario 2: Speadsheet with Cell
Editing" which answers this question.

Quote:
>I need to know if a user has selected distinct rows and then to be able to
>delete these (AND undo/redo these actions), not trivial matters.  The user
>also needs to be able to cut,copy and paste any number of rows.

Switch off automatic highlighting (HighLight = Never) and use
CellBackColor for highlighting selections. You can code selection of
individual rows and blocks of rows either contiguous or non-contiguous.
For Cut, Copy, and Paste look at the Grid Clip property, and the
Clipboard Object in VB Help.

--
Richard Mason



Sat, 29 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Toolbar and MSFlexgrid go missing in Visual Basic 5

2. do Visual Basic 6.0 and Visual Basic .NET version beta Working Both

3. Difference between Visual Basic 6 and Visual Basic.Net

4. Visual basic 4 to Visual basic 6

5. Visual Basic 3.0 to Visual Basic 6.0

6. Visual Basic 5 vs. Visual Basic 6

7. Visual basic programs - connect to a server - Visual Basic 5 Enterprice Edition

8. loading visual basic 3.0 applications in visual basic 5.0

9. Learning Basic - Visual Basic - Visual InterDev

10. Visual Basic 3.0 vs Visual Basic 4.0

11. Microsoft Visual Basic v3.0 Professional/Microsoft Visual Basic Assistant v3

12. Looking for differences between Visual Basic 5.0 enterprise and Visual Basic 5.0 Profesional

 

 
Powered by phpBB® Forum Software