JPG images in an xBrowse
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
JPG images in an xBrowse
Hi,
I have a table containing a column that is populated with the path & filename of a JPG file. Is it possible to have an xBrowse that shows a thumbnail of this image in one column along with additional columns from the table?
I think I can remember Uwe creating a tool that could do this, is this correct?
Best regards,
Pete
I have a table containing a column that is populated with the path & filename of a JPG file. Is it possible to have an xBrowse that shows a thumbnail of this image in one column along with additional columns from the table?
I think I can remember Uwe creating a tool that could do this, is this correct?
Best regards,
Pete
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: JPG images in an xBrowse
Peter
Try this .. aCols[7] represents the column you wish to view the picture .. add this line after you define the browse .. "F" defines the column as "file".
Rick Lipkin
Try this .. aCols[7] represents the column you wish to view the picture .. add this line after you define the browse .. "F" defines the column as "file".
Rick Lipkin
Code: Select all
oLbx:aCols[ 7 ]:cDataType := "F"
Re: JPG images in an xBrowse
Pete,
there will be a new tool in a short time, to show
a image / text - combination.
Is that the solution, You are looking for ?
Best Regards
Uwe
there will be a new tool in a short time, to show
a image / text - combination.
Is that the solution, You are looking for ?
Best Regards
Uwe
Last edited by ukoenig on Mon Aug 05, 2013 6:25 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: JPG images in an xBrowse
Hi Rick/Uwe,
Rick - thanks, I will have a look and see if I can get the browse to work with your suggestion.
Uwe - Yes that is what I want - the first column could be the thumbnail/image, the following columns would be columns from the same row in the table.
Thanks
Pete
Rick - thanks, I will have a look and see if I can get the browse to work with your suggestion.
Uwe - Yes that is what I want - the first column could be the thumbnail/image, the following columns would be columns from the same row in the table.
Thanks
Pete
Re: JPG images in an xBrowse
Pete,
the new tool is nearly finished and shows the needed results.
I still want to add some extras, before adding a new post for download.
Best Regards
Uwe
the new tool is nearly finished and shows the needed results.
I still want to add some extras, before adding a new post for download.
Best Regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: JPG images in an xBrowse
Uwe,
Looking forward to the update
Pete
Looking forward to the update
Pete
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: JPG images in an xBrowse
Mr Peter
This is EXTREMELY SIMPLE.
Just follow Mr Rick's suggestion.
You need to add just One Line of code
where n is the column number of the browse showing the field containing the filename
This is EXTREMELY SIMPLE.
Just follow Mr Rick's suggestion.
You need to add just One Line of code
Code: Select all
oBrw:aCols[ n ]:cDataype := "F"
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: JPG images in an xBrowse
Setting the cDatatype works well
Thanks once again
Thanks once again
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: JPG images in an xBrowse
This seems to work when i'm browsing a table, but if I create an array of filenames and browse the array, I just get an empty column - does it work on arrays?
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: JPG images in an xBrowse
Work on all.
Please make sure two things
value should be a valid path
and that column's cDataType should be set to "F"
Please make sure two things
value should be a valid path
and that column's cDataType should be set to "F"
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: JPG images in an xBrowse
Please try this example program:
Result:
Code: Select all
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oDlg, oBrw, aData := {}
AEval( DIRECTORY( "c:\fwh\bitmaps\pngs\*.png" ), { |a| ;
AAdd( aData, { a[ 1 ], "c:\fwh\bitmaps\pngs\" + a[ 1 ] } ) } )
DEFINE DIALOG oDlg SIZE 500,400 PIXEL
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE aData COLUMNS 2, 1 ;
HEADERS "Image", "Name" ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:aCols[ 1 ]:cDataType := "F"
:aCols[ 1 ]:nDataBmpAlign := AL_CENTER
:nStretchCol := 2
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
-
- Posts: 363
- Joined: Wed Feb 15, 2006 2:06 pm
- Location: Oxford, England
Re: JPG images in an xBrowse
Thanks for the example and it pointed out my glaringly obvious mistake.
Best regards,
Pete
Best regards,
Pete
Re: JPG images in an xBrowse
Pete,
the 2. style, using ARRAYS
1. full path displayed in a tooltip
2. three info-fields
3. filename displayed vertical
4. change image on right mouseclick
Best Regards
Uwe
the 2. style, using ARRAYS
1. full path displayed in a tooltip
2. three info-fields
3. filename displayed vertical
4. change image on right mouseclick
Best Regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.