Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Markup in xtpControlComboBox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Markup in xtpControlComboBox

 Post Reply Post Reply
Author
Message
Boris View Drop Down
Senior Member
Senior Member
Avatar

Joined: 21 June 2007
Location: United Kingdom
Status: Offline
Points: 179
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boris Quote  Post ReplyReply Direct Link To This Post Topic: Markup in xtpControlComboBox
    Posted: 26 June 2009 at 10:16am
Hi,
 
Having created my command bar in the Designer I am now ready to run my app. I have found the combo control in code and set its markup property to true. Then I want to add markup text to the list in the combo. However, this just shows the raw markup code.
 
Anybody have any suggestions?
 
Regards,
 
 
Boris

Product: Xtreme SuitePro (ActiveX) version 16.4.0 16.3.1

Platform: Windows XP (32bit) - SP 3

Language: Visual Basic 6.0 SP6

VS 2005-2008-2010-2013
Back to Top
Fossil View Drop Down
Groupie
Groupie
Avatar

Joined: 29 April 2006
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fossil Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 3:59pm
Sounds like the markup code is not in proper format.  What is the XAML code look like?
Product: Xtreme SuitePro (ActiveX) version 12.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Back to Top
Boris View Drop Down
Senior Member
Senior Member
Avatar

Joined: 21 June 2007
Location: United Kingdom
Status: Offline
Points: 179
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boris Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2009 at 7:09am
Hi again..
This code works for a std CJ cbo with markup. However the appearnce of a std CJ cbo is not the same as a CJ cbo added as a commandbar item. The latter is flat and the formar is raised they look wierd on the same command bar.
I have tried adding the cbocbar item and using the same code it just doesn't work.
 
Regards
 
 
Private Sub CreateEventLabels()
Dim pLabel As CalendarEventLabel

    For Each pLabel In CalendarControl.DataProvider.LabelList
       pAddComboItem Me.cboColorPicker, pLabel.Color, pLabel.Name, pLabel.LabelID
    Next
End Sub
 
Sub pAddComboItem(ComboBoxMarkup As Control, lColor As Long, sText As String, Optional lData As Long = 0)
Dim sColor As String
Dim lRed As Long, lGreen As Long, lBlue As Long
lRed = lColor And &HFF
lGreen = (lColor And &HFF00&) \ &H100&
lBlue = (lColor And &HFF0000) \ &H10000
sColor = Right$("0" & Hex$(lRed), 2) & Right$("0" & Hex$(lGreen), 2) & Right$("0" & Hex$(lBlue), 2)
ComboBoxMarkup.AddItem "<StackPanel Orientation='Horizontal'>" & _
            "<Rectangle  Fill='#" & sColor & "' Stroke='#000000' Width='14' Height='14'/>" & _
            "<TextBlock Padding = '2' VerticalAlignment='Center'>" & sText & "</TextBlock></StackPanel>"
ComboBoxMarkup.ItemData(ComboBoxMarkup.NewIndex) = lData
  
End Sub
Boris

Product: Xtreme SuitePro (ActiveX) version 16.4.0 16.3.1

Platform: Windows XP (32bit) - SP 3

Language: Visual Basic 6.0 SP6

VS 2005-2008-2010-2013
Back to Top
Fossil View Drop Down
Groupie
Groupie
Avatar

Joined: 29 April 2006
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fossil Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2009 at 8:54am
I understand what you are looking for now and yes it appears Markup is not supported in the CommandBar except in TabWorkspace and MessageBar objects which I did not realize.  Based on your theme you can get the look close, but the standard combo always shows a border.  I was actually looking for a way for the command bar dropdown to add in a border, but could not find that either.  There are some other dropdown boxes out there in the ActiveX world that may get you want you are looking for, or you may want to find out from CodeJock when Markup will be supported in the CommandBar controls.  As a last resort, you can take the edithandle property of the commandbar dropdown and use it to possibly subclass the control with API.
Product: Xtreme SuitePro (ActiveX) version 12.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Back to Top
Boris View Drop Down
Senior Member
Senior Member
Avatar

Joined: 21 June 2007
Location: United Kingdom
Status: Offline
Points: 179
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boris Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2009 at 9:05am
Hi
 
Thanks for your time. What this does show though is as CJ gets further up the version numbers we are all beginning to ask for attention to detail and consistency across their product range. We now focus on attention to detail with the same level of importance as the excellent stabilty of the product. It is by far the best out there.
 
Regards,
 
Boris

Product: Xtreme SuitePro (ActiveX) version 16.4.0 16.3.1

Platform: Windows XP (32bit) - SP 3

Language: Visual Basic 6.0 SP6

VS 2005-2008-2010-2013
Back to Top
Fossil View Drop Down
Groupie
Groupie
Avatar

Joined: 29 April 2006
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fossil Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2009 at 9:11am
I certainly agree.  There is alot of functionality already there and much potential to make it better and better.
Product: Xtreme SuitePro (ActiveX) version 12.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2009 at 2:59pm
Originally posted by Boris Boris wrote:

Hi,
 
Having created my command bar in the Designer I am now ready to run my app. I have found the combo control in code and set its markup property to true. Then I want to add markup text to the list in the combo. However, this just shows the raw markup code.
 
Anybody have any suggestions?
 
Regards,
 
 
 
Hi Boris,
 
Why don't you attach ordinary combobox (into picturebox first) to a CommandBarControlCustom and use it as an item in Commandbars?
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Boris View Drop Down
Senior Member
Senior Member
Avatar

Joined: 21 June 2007
Location: United Kingdom
Status: Offline
Points: 179
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boris Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2009 at 6:07am
Hi Aaron
 
I've have tried that. See my other post http://forum.codejock.com/forum_posts.asp?TID=14630
 
The problem is I need to hide/show various controls on the same bar accoring to the parameters the user is trying to query against. i.e. If a combo value elsewhere is = 1 Show a edit field for user input or = 2 a combo or 3 = custom control etc etc.
 
If I don't hide these controls it could misdirect the user. However, when hiding a custom control I see a white patch.
 
Best regards
 
Boris

Product: Xtreme SuitePro (ActiveX) version 16.4.0 16.3.1

Platform: Windows XP (32bit) - SP 3

Language: Visual Basic 6.0 SP6

VS 2005-2008-2010-2013
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.