COMBOBOX WITH BITMAPS

COMBOBOX WITH BITMAPS

Postby Silvio » Fri Feb 18, 2011 10:44 am

I made

local aItems := { 'COMPUTER','PORTATILE','STAMPANTE','MONITOR', 'TASTIERA', 'SWITCH', ;
'MOUSE', 'POCKET','SCANNER','PROIETTORE' ,'VIDEOCAMERA' , 'FILMCAMERA' , 'FOTOCAMERA' }

...

@ 0.8, 14 say "&Tipo Hardware :" OF oDlg
@ 0.8, 16 COMBOBOX aGet[2] VAR cType ITEMS aItems OF oDlg;
BITMAPS { 'HARD_01',;
'HARD_02' ,;
'HARD_03' ,;
'HARD_04' ,;
'HARD_05',;
'HARD_06' ,;
'HARD_07',;
'HARD_08',;
'HARD_09' ,;
'HARD_10',;
'HARD_11',;
'HARD_12',;
'HARD_13' } SIZE 80,30 STYLE CBS_DROPDOWNLIST


BUT I CANNOT SEE THE BITMAPS BUT ONLY THE ITEMS

HOW I CAN MAKE TO SHOW BITMAPS AND ITEMS ?

NOTE: THE BITMAPS ARE ON A RESOURCES FILES!!
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: COMBOBOX WITH BITMAPS

Postby anserkk » Fri Feb 18, 2011 12:02 pm

What is the size of the BITMAPS used ? Is it 16 x 16 ?

viewtopic.php?f=3&t=20831

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: COMBOBOX WITH BITMAPS

Postby Silvio » Fri Feb 18, 2011 12:19 pm

Anserkk,
yes they are 16x16 simply bitmaps no alpha

only it give me this error

Error description: Error BASE/1132 Error de rango: acceso al array



Code: Select all  Expand view
pplication
===========
   Path and name: C:\WORK\errori2\work\test.Exe (32 bits)
   Size: 2,945,536 bytes
   Time from start: 0 hours 1 mins 21 secs
   Error occurred at: 18-02-2011, 13:18:06
   Error description: Error BASE/1132  Error de rango: acceso al array
   Args:
     [   1] = A   { ... }
     [   2] = N   0

Stack Calls
===========
   Called from: imagelis.prg => LBXDRAWITEM(510)
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:DRAWITEM(758)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1499)
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:HANDLEEVENT(604)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3394)
   Called from:  => SENDMESSAGE(0)
   Called from: .\source\classes\WINDOW.PRG => TDIALOG:DRAWITEM(1165)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT(944)
   Called from:  => SYSREFRESH(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:END(531)
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORDIALOG(360)
   Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK(176)
   Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT(1447)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3394)
   Called from:  => SENDMESSAGE(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND(408)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT(944)
   Called from:  => DIALOGBOXINDIRECT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
   Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG(379)
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS(27)
   Called from: imagelis.prg => LBXDRAWITEM(510)
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:DRAWITEM(758)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1499)
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:HANDLEEVENT(604)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3394)
   Called from:  => SENDMESSAGE(0)
   Called from: .\source\classes\WINDOW.PRG => TDIALOG:DRAWITEM(1165)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT(944)
   Called from:  => DIALOGBOXINDIRECT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
   Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG(379)
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS(27)
   Called from: imagelis.prg => LBXDRAWITEM(510)
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:DRAWITEM(758)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1499)
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:HANDLEEVENT(604)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3394)
   Called from:  => SENDMESSAGE(0)
   Called from: .\source\classes\WINDOW.PRG => TDIALOG:DRAWITEM(1165)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT(944)
   Called from:  => DIALOGBOXINDIRECT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
   Called from: source\PHardware.prg => HWEDITA(550)
   Called from: source\PHardware.prg => (b)HARDWARE(203)
   Called from: Lib\VMenu.prg => TVMENU:EVALACTION(1700)
   Called from: Lib\VMenu.prg => TVMENU:LBUTTONUP(1398)
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1489)
   Called from: Lib\VMenu.prg => TVMENU:HANDLEEVENT(905)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3394)
   Called from:  => WINRUN(0)
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(978)
   Called from: source\main.prg => TAPPLICATION:ACTIVATE(167)
   Called from: source\main.prg => MAIN(49)
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: COMBOBOX WITH BITMAPS

Postby Silvio » Fri Feb 18, 2011 12:24 pm

NOT RUN ALSO WITH

@ 0.8, 16 COMBOBOX aGet[2] VAR cType ITEMS aItems OF oDlg;
BITMAPS {".\bitmaps\SM_HARD.bmp" ,;
".\bitmaps\SM_LAP.bmp" ,;
".\bitmaps\SM_PRT.bmp" ,;
".\bitmaps\SM_MON.bmp" ,;
".\bitmaps\SM_KEY.bmp" ,;
".\bitmaps\SM_SWI.bmp" ,;
".\bitmaps\SM_MOU.bmp" ,;
".\bitmaps\SM_PALM.bmp" ,;
".\bitmaps\SM_SCAN.bmp" ,;
".\bitmaps\SM_PRO.bmp" ,;
".\bitmaps\SM_VID.bmp" ,;
".\bitmaps\SM_FILM.bmp" ,;
".\bitmaps\SM_CAME.bmp"} SIZE 80,80



and as I saw on ownerdra.prg fivewin sample ( it run ok)

but when I insert the combo on my prg NOT RUN

@ 0.8, 16 COMBOBOX aGet[2] VAR cType ITEMS aItems OF oDlg;
BITMAPS {"..\bitmaps\SM_HARD.bmp" ,;
"..\bitmaps\SM_LAP.bmp" ,;
"..\bitmaps\SM_PRT.bmp" ,;
"..\bitmaps\SM_MON.bmp" ,;
"..\bitmaps\SM_KEY.bmp" ,;
"..\bitmaps\SM_SWI.bmp" ,;
"..\bitmaps\SM_MOU.bmp" ,;
"..\bitmaps\SM_PALM.bmp" ,;
"..\bitmaps\SM_SCAN.bmp" ,;
"..\bitmaps\SM_PRO.bmp" ,;
"..\bitmaps\SM_VID.bmp" ,;
"..\bitmaps\SM_FILM.bmp" ,;
"..\bitmaps\SM_CAME.bmp"} SIZE 80,80
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: COMBOBOX WITH BITMAPS

Postby ukoenig » Fri Feb 18, 2011 1:43 pm

Hello Silvio,

because of Path-defines, sometimes I got Problems to find BMP's
I don't use .\ or ..\ anymore.

Instead I use :

c_path := CURDRIVE() + ":\" + GETCURDIR()

and the BMP-call with

c_Path + "\bitmaps\" + cBmp1
or
c_Path + "\Images\16x16\" + cBmp1

where cBmp1 = "LOGO.BMP"

maybe it can fix Your problem.

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: COMBOBOX WITH BITMAPS

Postby TimStone » Fri Feb 18, 2011 7:24 pm

I had a similar problem. My bitmaps are referenced in the .rc file so included in the .exe.

I found it was necessary to use 16x16 bit alpha bitmaps, and it works perfectly. In this case, I wanted color swatches, so I have bitmaps with solid colors. Using any other size, or type ( ie. 8 bit, etc ) did not work but these do.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: COMBOBOX WITH BITMAPS

Postby ukoenig » Fri Feb 18, 2011 7:53 pm

Hello Tim,

16x16 is OK, to use for Comboboxes.
It is also possible, to display bigger sizes, but there is a Row-size-problem :
Row-height / width is not adjusted like in xBrowse.

Image

Best regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: COMBOBOX WITH BITMAPS

Postby Silvio » Fri Feb 18, 2011 8:29 pm

perhaps I found the error ....

I use vtaskbar of paco and link to my application his lib ( c5new)

when I erase this lib from my application I see combobox with bitmaps !!!!!!!!!!!!!!!!!!!!!!!

But this is very strange ....because I used that lib always ....
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 84 guests