Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » User can't add icon to command Collapse All
Subject Author Date
Robert Webb Jan 26, 2010 - 7:44 PM

Hi,


Using ProfUIS customization, user may edit icons for existing commands (on toolbars or menus).


However, they are limited to the colour palette of the original image.  Eg, if the icon only required 2 colours, then they are limited to only those two colours if they wish to edit the icon.  This is very limiting.


Even worse, if they wish to add an icon to a command that doesn’t have an icon by default, then they are stuck.  It can’t be done, from what I can see.  For example, many menu commands may not have an icon, and we also add commands on the fly which have no icon.  Our users need to be able to add and edit icons for these.  How can we achieve this?


I tried adding a blank place-holder icon for every command, but again we have the above problem, where the icon only has one or two colours and can’t be edited very effectively.  But also the blank icon is then used in menus instead of a tick.  So instead of a tick or no tick, there is always just the blank image, either highlighted or not.


Why shouldn’t the user always be able to add and edit icons with 24-bit colour?  Is there no way to make this possible?


Thanks,


Rob.

Technical Support Feb 2, 2010 - 2:07 PM

Thank you for your comments. Here is the complete new set of new CExtColorPaletteWnd control styles:

// use color picker dialog for picking color on left/right mouse button clicks
// these two styles work only if the __ECPWS_PICK_ACTIVE_COLOR_HT is not specified
#define __ECPWS_PICK_ACTIVE_COLOR_LMB                                     0x00000080L
#define __ECPWS_PICK_ACTIVE_COLOR_RMB                                                0x00000100L
// use color picker dialog for picking color on left mouse button click over
// active colors
#define __ECPWS_PICK_ACTIVE_COLOR_HT                                       0x00000200L
// the __ECPWS_PICK_ACTIVE_COLOR_LMB, __ECPWS_PICK_ACTIVE_COLOR_RMB and __ECPWS_PICK_ACTIVE_COLOR_HT styles
// should add the picker color to displayed palette 
#define __ECPWS_PICK_ACTIVE_COLOR_MODIFY_PALETTE   0x00000400L

The CExtIconEditDlg dialog uses the color palette with the styles by __ECPWS_PICK_ACTIVE_COLOR_HT|__ECPWS_PICK_ACTIVE_COLOR_MODIFY_PALETTE default. So, you don’t need to do anything but downloading the latest source code again.

Robert Webb Feb 5, 2010 - 12:10 AM

It works great!


Thanks,


Rob.

Technical Support Jan 27, 2010 - 1:08 PM

We added a new CExtCustomizeSite::m_bEnableIconOptionsForIconlessCommands flag property in Prof-UIS 2.89. It allows you to assign icons to icon-less commands in the customize mode. You can drop us an e-mail to the support mail box at this web site so we will provide you with the source code update.
The image editor allows you to work with 24 bit color images only. The 32 bit color images are not supported at this moment. This image editor is not an Adobe Photoshop. But if you have a 32 bit image, then you can paste it in the customize mode.

Robert Webb Jan 31, 2010 - 8:57 PM

Thanks.  It wasn’t in the one I downloaded after you sent me the link, but it is there now in a newer version since then.


It works, allowing the user to provide images for commands that didn’t have one to start with.  Great!


However, although 24-bit images are supported, the user is limited to a palette of the colours that are already there to begin with.  In the case of a new image, this is only 2 or 3!  I can’t find any way to use a new colour or to change the colour of those colours already in the palette.  There’s a work around though: create the image elsewhere and copy/paste it into the editor.  At first the palette doesn’t update and still only 2 or 3 colours may be available, but the palette refills if you close and reopen the editor.  Still, it really needs a way to choose a colour for drawing with.  I’m not asking for Photoshop, but it’s next to useless if you can only draw new images in black and white.


I’d suggest that when the current foreground or background colour is clicked on, it opens a colour chooser.


Thanks,


Rob.

Technical Support Feb 1, 2010 - 11:51 AM

We agree with your suggestion. We added new __ECPWS_PICK_ACTIVE_COLOR_LMB and __ECPWS_PICK_ACTIVE_COLOR_RMB styles used by the CExtColorPaletteWnd control. They allow you to pick custom colors on left/right mouse button clicks over active colors area.

Robert Webb Feb 1, 2010 - 4:55 PM

Thanks, I haven’t tried it yet, but rather than left-click for foreground colour and right-click for background colour, wouldn’t it be more intuitive to left-click on either the foreground colour indicator or the background colour indicator to change the relevant colour?  That’s how other packages like PaintShopPro do it.  It’s more intuitive to click on the thing you want to change.


Oh, and it looks like your overnight build is labelled incorrectly.  2010-02-21.  It’s not the 21st of Feb yet :-)


Thanks,


Rob.

Robert Webb Feb 1, 2010 - 5:16 PM

Oh, and this is probably a silly question, but where do I set those new styles?  The icon editor is created in Prof-UIS’s customization code, not by me, so where do I set the styles?


If you use my suggestion of clicking on the indicator for the colour you want to change (ie one of the two small overlapping squares in the top right corner of the icon editor) then I can’t see why this functionality would need to be optional anyway.


Thanks,


Rob.