Print Page | Close Window

Excel 2007 Number Format Combo box

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8321
Printed Date: 05 February 2025 at 12:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Excel 2007 Number Format Combo box
Posted By: indices
Subject: Excel 2007 Number Format Combo box
Date Posted: 05 October 2007 at 4:26pm
How can I recreate the Excel 2007 Number format combo box which displays icons and additional description when the user clicks on the drop down?
 
Thanks.



Replies:
Posted By: indices
Date Posted: 18 October 2007 at 3:03pm
For the record I managed to fake this by a custom size icon and writting the caption onto it at runtime.


Posted By: Oleg
Date Posted: 19 October 2007 at 1:09am
Hi,
 
For next release we added support of xtpButtonIconAndCaption for gallery control.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: indices
Date Posted: 19 October 2007 at 9:11am

Hi Oleg,

I upgraded to 11.2.0 which had the new ListIconID property for combo box. But it doesn't seem to work as expected.

Const ID_AUDIO_TYPE_WAV=3000
Const ID_AUDIO_TYPE_MP3=3001
Const ID_AUDIO_TYPE_WMA=3002
Const ID_AUDIO_TYPE=2999

Dim oCb As XtremeCommandBars.CommandBarComboBox
   
Set oCb = GroupEncode.Add(XtremeCommandBars.XTPControlType.xtpControlComboBox, ID_AUDIO_TYPE, "")
    With oCb
        .ListIconId = ID_AUDIO_TYPE_WAV
        .AddItem "Encode As WAV"
        .AddItem "Encode As MP3"
        .AddItem "Encode As WMA"
        .ListIndex = 1
        .Style = xtpButtonIconAndCaption
        .Width = 150
    End With
 
 
The Commandbar is associated with an imagemanager control containing icons for the respective IDs.
 
At runtime, the icon appears only on the last item in the dropdown and also it displays the wrong icon. It displays the icon for the 1st item for the last item.
 
Here is the runtime snapshot.
http://img141.imageshack.us/img141/5510/runtimeht6.jpg
 
What am I doing wrong?
Thanks
 
 


Posted By: Oleg
Date Posted: 19 October 2007 at 3:25pm
Hi,
ListIconID specify base id - for first item. So obviously you have icon for ID_AUDIO_TYPE_WMA id but not for ID_AUDIO_TYPE_WAV and ID_AUDIO_TYPE_MP3


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: indices
Date Posted: 20 October 2007 at 8:10am

One further clarification, the release notes for 11.2.0 has:

5 New feature CommandBarComboBox::ThemedItems propety added, Added support of Office2007 items style

Is it the same style as the one obtained using the code above or is it something more? It is possible to force a line break for a item caption? 

Thanks.


Posted By: Oleg
Date Posted: 22 October 2007 at 2:31am
Hi,
Yes this is Office2007 style in screenshot.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: indices
Date Posted: 24 October 2007 at 7:41pm
>For next release we added support of xtpButtonIconAndCaption for gallery control.
 
Is this going to be in 11.2.1?
Will it be possible to create a gallery like this image?
http://img99.imageshack.us/img99/3229/listmt2.png


Posted By: Oleg
Date Posted: 25 October 2007 at 1:40am
Yes, will be possible. You can download preview version from beta.codejock.com


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: indices
Date Posted: 26 October 2007 at 3:22pm
Thank you. Looking forward to it.


Posted By: indices
Date Posted: 26 October 2007 at 6:39pm

I am using the beta build to test:

Dim GallerySlide As CommandBarGallery

Set Popup = CommandBars.Add("Thumbnails", xtpBarPopup)
Set GallerySlide = Popup.Controls.Add(xtpControlGallery, ID_SLIDE_LIST, "")
With GallerySlide
           .Style = xtpButtonIconAndCaption
            .Width = 480
            .Height = 420
End With
 
This is still drawing a gallery with icons and the caption as tooltip. What did i do wrong?
 
Thanks
 


Posted By: indices
Date Posted: 27 October 2007 at 9:57am
Nevermind. I needed to add sufficient width to the gallery item to make the caption appear. 
 
This works great.


Posted By: indices
Date Posted: 27 October 2007 at 10:03am

Is it possible to wrap the caption or have a multi-line caption for this style?



Posted By: Oleg
Date Posted: 29 October 2007 at 3:00am
No :(
Think we will add xtpButtonCaptionAndDescription support also.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net