Combobox: How to color items
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Combobox: How to color items
Is it possibile to color each item of a Combobox with a different color?
King Regards
Marco
King Regards
Marco
Marco Boschi
info@marcoboschi.it
info@marcoboschi.it
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Combobox: How to color items
Marco,
Please review FWH\samples\ownerdra.prg
Please review FWH\samples\ownerdra.prg
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Re: Combobox: How to color items
Antonio,
not all bitmaps are correctly displayed
I open yellow.bmp using Paint I draw another color using brush and save
But I cannot see correctly the bitmap
not all bitmaps are correctly displayed
I open yellow.bmp using Paint I draw another color using brush and save
But I cannot see correctly the bitmap
Marco Boschi
info@marcoboschi.it
info@marcoboschi.it
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Re: Combobox: How to color items
This is bmp file modified
This is one of correct bitmaps
This is one of correct bitmaps
Marco Boschi
info@marcoboschi.it
info@marcoboschi.it
Re: Combobox: How to color items
Run ok for me
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- Marc Venken
- Posts: 727
- Joined: Tue Jun 14, 2016 7:51 am
Re: Combobox: How to color items
Hello Christobal,
Could you share the code for the combo with the colors insite ?
Could you share the code for the combo with the colors insite ?
Marc Venken
Using: FWH 20.08 with Harbour
Using: FWH 20.08 with Harbour
Re: Combobox: How to color items
Look post of AntonioMarc Venken wrote:Hello Christobal,
Could you share the code for the combo with the colors insite ?
Antonio Linares wrote:Marco,
Please review FWH\samples\ownerdra.prg
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Re: Combobox: How to color items
Cristobal,
if you download this bmp file http://www.marcoboschi.it/public/rosso.bmp
and subsititute one of bmp files you can see that there is a problem
You cannot see the bitmap rosso.bmp
The question is: these bmp files are particular bmp files?
screenshot
if you download this bmp file http://www.marcoboschi.it/public/rosso.bmp
and subsititute one of bmp files you can see that there is a problem
You cannot see the bitmap rosso.bmp
The question is: these bmp files are particular bmp files?
screenshot
Marco Boschi
info@marcoboschi.it
info@marcoboschi.it
Re: Combobox: How to color items
Ah!, ok, I will try
Send me your image original
Send me your image original
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Re: Combobox: How to color items
A test
regards
Uwe
Code: Select all
REDEFINE COMBOBOX oCbx2 VAR cItem4 ;
ID 140 OF oDlg ;
ITEMS { " White", " Blue", " Rosso", " Yellow", " Green", " Red" } ;
BITMAPS { c_path + "sWhite.bmp",;
c_path + "sBlue.bmp",;
c_path + "sRosso.bmp",;
c_path + "sYellow.bmp",;
c_path + "sGreen.bmp",;
c_path + "sRed.bmp" }
oCbx2:nItemHeight( 22 )
Uwe
Last edited by ukoenig on Mon Feb 26, 2018 6:34 pm, edited 4 times 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.
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Combobox: How to color items
The bitmaps are drawn, treating the color at pixel 0,0 as transparent. In the case of rosso.bmp, color at (0,0) is same as the entire body of the bitmap, so the entire bitmap is treated as transparent.
Please choose a bitmap where the color at (0,0) is different from the rest of the bitmap
Please choose a bitmap where the color at (0,0) is different from the rest of the bitmap
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Combobox: How to color items
Rao,
the left upper corner is different in color
to show a black frame
regards
Uwe
the left upper corner is different in color
to show a black frame
regards
Uwe
Last edited by ukoenig on Mon Feb 26, 2018 7:34 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.
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Combobox: How to color items
Uwe
I am referring to the bitmap downloaded from http://www.marcoboschi.it/public/rosso.bmp, not the bmps you are using.
Yes. Because in your bitmaps 0,0 color is different from the rest of the colors, the painting is ok.
I am referring to the bitmap downloaded from http://www.marcoboschi.it/public/rosso.bmp, not the bmps you are using.
Yes. Because in your bitmaps 0,0 color is different from the rest of the colors, the painting is ok.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact: