Print Page | Close Window

Markup in xtpControlComboBox

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=14628
Printed Date: 06 October 2024 at 8:29pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Markup in xtpControlComboBox
Posted By: Boris
Subject: Markup in xtpControlComboBox
Date 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



Replies:
Posted By: Fossil
Date 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


Posted By: Boris
Date 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


Posted By: Fossil
Date 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


Posted By: Boris
Date 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


Posted By: Fossil
Date 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


Posted By: Aaron
Date 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....


Posted By: Boris
Date 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 - 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



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