 |
 |

12-07-2002, 05:03 AM
|
|
|
MSFlexGrid picture
|
I've read this text on one of the topics:
Quote:
Remarks
You can put text, a picture, or both, in any cell of an MSFlexGrid. The Row and Col properties specify the current cell in an MSFlexGrid. You can specify the current cell in code, or the user can change it at run time using the mouse or the arrow keys. The Text property references the contents of the current cell.
|
and my question is , i've try'd to add pictures to a cell (0,1) but it didn't work, the only thing i saw was an error , can someone help me?
|
|

12-07-2002, 05:15 AM
|
 |
Lost Soul
Super Moderator * Guru *
|
|
Join Date: May 2001
Location: Vorlon
Posts: 18,882
|
|
|
Can you show us your code and tell us the error number/description you get.
|
|

12-07-2002, 05:27 AM
|
|
|
When i've posted this topic my friend came online and i asked him if he knew the answer... this is what he said:
Code:
Set MSFlexgrid.CellPicture = imgImages.ListImages(1).Picture
Dim img As ListImage
Set img = imgImages.ListImages.Add(1, "Ticked", LoadPicture(App.Path & "\TickedBox.Bmp"))
Set img = imgImages.ListImages.Add(2, "Crossed", LoadPicture(App.Path & "\Crossed.Bmp"))
Set MSFlexgrid.CellPicture = imgImages.ListImages(1).Picture
But it didn't work either. my first code wasn't very diffucult .. but i try'd MsFlexGrid1.CellPicture (0,1) = app.Path & "Plaatjes/icon.ico"
|
|

12-07-2002, 05:37 AM
|
 |
Lost Soul
Super Moderator * Guru *
|
|
Join Date: May 2001
Location: Vorlon
Posts: 18,882
|
|
|
Indeed, the CellPicture method works only on the current cell (.Row, .Col), it doesn't accept parameters.
|
|

12-07-2002, 05:46 AM
|
|
|
Do you know how i can let it work? 
|
|

12-07-2002, 06:49 AM
|
 |
Lost Soul
Super Moderator * Guru *
|
|
Join Date: May 2001
Location: Vorlon
Posts: 18,882
|
|
Straight from the help:
Quote:
Code:
Private Sub Form_Click ()
' Load the icons.
MSHFlexGrid1.Row =1
MSHFlexGrid1.Col =1
Set MSHFlexGrid1.CellPicture =_
LoadPicture("Icons\Computer\Trash02a.ico")
MSHFlexGrid1.Row =1
MSHFlexGrid1.Col =2
Set MSHFlexGrid1.CellPicture =_
LoadPicture("Icons\Computer\Trash02b.ico")
End Sub
|
|
|

12-07-2002, 07:14 AM
|
|
|
Code:
If query!Type = "uitgaven" Then
MSFlexGrid1.Row = 1
MSFlexGrid1.Cols = 1
Set MSFlexGrid1.CellPicture = LoadPicture(App.Path & "\Plaatjes\APPSStop.ico")
End If
This is the code what i currently have. But it doesn'y work either.. i get this error:
<Invalid Column Value>
|
|

12-08-2002, 02:33 AM
|
 |
Lost Soul
Super Moderator * Guru *
|
|
Join Date: May 2001
Location: Vorlon
Posts: 18,882
|
|
|
How many rows & columns does your flexgrid have?
|
|

12-08-2002, 03:59 AM
|
 |
| Coder XXX |
Retired Leader
|
|
Join Date: Jun 2001
Location: Kuala Lumpur, Malaysia.
Posts: 3,018
|
|
Quote:
Originally posted by Micheltje
Code:
If query!Type = "uitgaven" Then
MSFlexGrid1.Row = 1
MSFlexGrid1.Cols = 1
Set MSFlexGrid1.CellPicture = LoadPicture(App.Path & "\Plaatjes\APPSStop.ico")
End If
This is the code what i currently have. But it doesn'y work either.. i get this error:
<Invalid Column Value>
|
Try this way.
Code:
If query!Type = "uitgaven" Then
MSFlexGrid1.Row = 1
MSFlexGrid1.Col = 1
Set MSFlexGrid1.CellPicture = LoadPicture(App.Path & "\Plaatjes\APPSStop.ico")
End If
|
|

12-08-2002, 04:54 AM
|
|
|
Thanks a lot  .. it worked
Michel
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|