display images in grid or browse

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
fouednoomen
Posts: 97
Joined: Sun Oct 14, 2012 8:33 am
DBs Used: DBF,MySql
Location: Tunisia
Been thanked: 1 time

display images in grid or browse

Post by fouednoomen » Sat Feb 08, 2020 6:32 pm

Hello all Friends

How can i display image dbf file in grid or browse , images are stocked in memo fields

Best regads
Foued noomen

User avatar
AUGE_OHR
Posts: 592
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 75 times
Been thanked: 129 times

Post by AUGE_OHR » Sat Feb 08, 2020 10:42 pm

hi,

i have not found any Sample for BROWSE ... but for GRID
i also have not check yet how harbour / HMG store Bitmap into Memo ( Xbase++ remove 14 Byte BMP Header ... )

the sample i work with is c:\hmg.3.4.4\SAMPLES\Controls\Grid\Grid_ImageIndex\demo.prg

it have a 1-Dim Array with Name of Image / Resource ... so it is different from Memo file.
it use ImageIndex to find "right Image" for each Row to display.

btw. Windows use Imagelist to hold those Image.

---

i´m still a Newbie under harbour / HMG so i´m not sure which Version use Imagelist ... HMG or MiniGUI
it is on my ToDo list while i want to use it for my HBFM (harbour FileManeger) to display System Icon.

---
just a Idea :idea:
you can try to use ON CHANGE Event to display Image "external"

Code: Select all

   DEFINE WINDOW Form_1 ;

      DEFINE IMAGE Image_1 ;
         ...   
      END IMAGE
      DEFINE GRID Grid_1 ;
         ...  
         ON CHANGE Test_Value();
      END GRID

Procedure Test_Value
   Form_1.Image_1.Picture := cImageName
RETURN
have fun
Jimmy

User avatar
mustafa
Posts: 882
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Been thanked: 147 times
Contact:

Post by mustafa » Sun Feb 09, 2020 12:32 pm

Hi friend Foued

  If you can serve this Sample

* ------------------------------- DBF External image --------------------------------
"Delete_Recall.zip"

  viewtopic.php?f=5&t=6248&hilit=mustafa&start=10

the Image is not within the Database only in TEST Register-> PHOTO
  mark the path that the images are inside Folder -> Sample Photo \ Photo \ 00005.bmp

* -------------------------------DBF Image Inside the MEMO Camp ---------------------
  and with graphic file, based on a graphic that
  found in a Memo Field of the Database.

  "Photos_DBF_Memo.zip"
  viewtopic.php?f=12&t=745&p=57795&hilit=mustafa#p57795

*------------------------------- SQLITE External image -----------------------------------------------
"Sqlite_Photo_Selection.zip"
"Sqlite_Photo_Selection_New_Plus.zip"

viewtopic.php?f=9&t=4795&p=59878&hilit=sqlite#p59878

Sorry I do not speak English ;)

  Regards / Saludos

User avatar
fouednoomen
Posts: 97
Joined: Sun Oct 14, 2012 8:33 am
DBs Used: DBF,MySql
Location: Tunisia
Been thanked: 1 time

Post by fouednoomen » Fri Feb 14, 2020 1:07 pm

Many thanks my friend

Post Reply