Make a ToolButton 256 colors

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Make a ToolButton 256 colors

Postby Tranber44 on Thu Oct 10, 2024 2:14 pm

Hello,
I'm trying to create a "Toolbutton" in 256 colors. In 16 colors I get the desired parameters but the rendering is insufficient:

'BtExcel' ⎕WC 'Bitmap' ('G:\Gestcf20242025\FicBas\IcoExcel16.bmp')
'F1' ⎕WC 'Form' ('Picture' BtExcel 1) - OK
PIX CM←'BtExcel' ⎕WG 'Bits' 'CMap'
⍴¨PIX CM
98 98 16 3

If I use a 256 color *.bmp image I cannot retrieve the PIX and CM parameters :

'BtExcel' ⎕WC 'Bitmap' ('G:\Gestcf20242025\FicBas\IcoExcel256.bmp')
'F1' ⎕WC 'Form' ('Picture' BtExcel 1) - Ok
PIX CM←'BtExcel' ⎕WG 'Bits' 'CMap'
⍴¨PIX CM
0 0 0 3
I think I'm missing a step but the documentation is not very explicit on this subject. Can you enlighten me?

Kind regards
Bertrand Delassus
Tranber44
 
Posts: 36
Joined: Mon Jan 11, 2010 4:46 pm

Re: Make a ToolButton 256 colors

Postby Rav on Thu Oct 10, 2024 3:13 pm

See if using the CBits property, instead of Bits and CMap, work for you. / Rav
Rav
 
Posts: 33
Joined: Tue Jul 25, 2023 4:41 pm

Re: Make a ToolButton 256 colors

Postby Tranber44 on Sat Oct 12, 2024 7:20 am

Hello,
Very good suggestion. Thank you.
Sincerely
Bertrand Delassus
Tranber44
 
Posts: 36
Joined: Mon Jan 11, 2010 4:46 pm


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest