Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Icon on Grid column
Message
From
03/08/2000 03:29:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00399309
Message ID:
00400241
Views:
18
>It still only appears one icon.
>I've done the following code:
>
>if not empty(cursor_frmOrdFabCarteira_Of.IMAGEM)
> Thisform.GRD1.COLUMN2.IMG1.Picture = cursor_frmOrdFabCarteira_Of.IMAGEM
>endif
>Return Thisform.GRD1.COLUMN2.Backcolor


Ricardo,
Create a directory and put there a number of image files, then try this (no check if a valid dir is selected, files are imagefiles etc):
lcPath = getdir()
lnFiles = adir(aImageList, lcPath+'*.*')
Create cursor myImageList (FileName m)
For ix=1 to alen(aImageList,1)
  Insert into myImageList values (lcPath+aImageList[ix,1])
Endfor
Go top
oForm = createobject('myForm')
With oForm
  .Lockscreen = .t.
  .Height = 400
  .Width = 600
  .Addobject('myGrid','Grid')
  .Addobject('clbutton','closebutton')
  .clbutton.visible = .t.
  With .myGrid
    .Left = 0
    .Top = 20
    .Height = 370
    .Width = 590
    .Columncount = -1
    .Recordsource = 'myImageList'
    .Columncount = 2
    .RowHeight = .RowHeight * 7
    With .Columns(2)
      .Addobject('myContainer','Container')
      .CurrentControl = 'myContainer'
      .Sparse = .f.
      With .myContainer
        .Addobject('myImage','Image')
        .myImage.Visible = .t.
      Endwith
      .Dynamicbackcolor = 'thisform.fake()'
    Endwith
    .Visible = .t.
  Endwith
  .Lockscreen = .f.
Endwith
oForm.Show
Read events

Define class myForm as Form
  Procedure fake
  Thisform.myGrid.Columns(2).myContainer.myImage.Picture = myImageList.FileName
  Return thisform.myGrid.Backcolor
Endproc
Enddefine
Define class CloseButton as commandbutton
  Height = 15
  Caption ='close'
  Procedure click
  Clear events
  Thisform.release
Endproc
Enddefine
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform