Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid takes long time when Image control used
Message
From
18/07/2010 11:08:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/07/2010 00:23:55
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01472780
Message ID:
01472854
Views:
53
>Cetin,
>
>Hi, I just tried the following:
>
>- dropped an Image control with default name of Image1 in the Column1 of a test grid Grid1.
>- no container was put.
>- in Column1's DynamicFontBold property, I put:
>
>
>Thisform.ShowPicture()
>
>
>- in ShowPicture of the form:
>
>
>Thisform.Grid1.Column1.Image1.Picture = employee.picfile
>
>RETURN Thisform.Grid1.Column1.FontBold
>
>
>Upon running the form, I get an "Unkown member Image1" error message.
>
>In Column1, I also set Sparse = .F. and CurrentControl = Image1
>
>What do you think went wrong?
>
>Thanks In Advance.
>
>Dennis

IMHO follow the message. If it is saying unknown member then you should have an error in referencing to correct column and control. You may check in debugger. Here is a sample:
Public oForm
oForm = Createobject('SampleForm')
oForm.Show

Define Class SampleForm As Form
 DataSession = 2
 Add Object myGrid As Grid WITH Recordsource='myImageList'

 Procedure Load
  lcPath = _samples+'data\graphics\'
  Create Cursor myImageList (FileName m)
  For ix=1 To Adir(aImageList, m.lcPath+'*.Gif')
   Insert Into myImageList Values (m.lcPath+aImageList[m.ix,1])
  Endfor
  Locate
 Endproc

 Procedure myGrid.Init
  With This
   .RecordSource = 'myImageList'
   .ColumnCount = 1
   .RowHeight = 75
   With .Columns(1)
    .Width=65
    .AddObject('myImage','Image')
    .myImage.Visible = .T.
    .myImage.Stretch=1
    .DynamicFontBold = 'thisform.ShowPicture()'
    .CurrentControl = 'myImage'
    .Sparse = .F.
   Endwith
  Endwith
 Endproc

 Procedure ShowPicture
  Thisform.myGrid.Columns(1).myImage.Picture = myImageList.FileName
 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
Reply
Map
View

Click here to load this message in the networking platform