Print Page | Close Window

xtpControlCheckBox status xtpGrayed in Ribbon ?

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=13365
Printed Date: 21 May 2024 at 4:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: xtpControlCheckBox status xtpGrayed in Ribbon ?
Posted By: mav46
Subject: xtpControlCheckBox status xtpGrayed in Ribbon ?
Date Posted: 09 February 2009 at 10:55am
How'dy y'all,
 
I need to set a xtpControlCheckBox, the one on a ribbon group, to "grayed".
Such status should be set either via code either clicking on the control.
 
 
'[CUT] ...
Dim GroupFilter As RibbonGroup
Dim checkControl As CommandBarControl
 
Set checkControl = GroupFilter.Add(xtpControlCheckBox, 5000, "check1")
checkControl.DescriptionText = "Some description"
checkControl.Checked = False
'[CUT] ...
 
Actually, I add the control in the Ribbon by the above code but the CommandBarControl type don't support the "value" property to set the status on xtpGrayed, it's support only the checked property that accept only e true|false values .....
 
At the time being I don'know how to do it, can you help me please?
 
Many Thanks
 
 


-------------
Product: Xtreme SuitePro (ActiveX) 12.1.1
Platform: Win XP (32bit)
Language: Visual Basic 6.0 SP5



Replies:
Posted By: Oleg
Date Posted: 09 February 2009 at 11:58am
checkControl.Enabled = False

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


Posted By: mav46
Date Posted: 09 February 2009 at 12:16pm
Originally posted by oleg oleg wrote:

checkControl.Enabled = False


Hi Oleg, I don't understand what do you mean ... the .enabled = False don't work like .value = xtpGrayed ....


-------------
Product: Xtreme SuitePro (ActiveX) 12.1.1
Platform: Win XP (32bit)
Language: Visual Basic 6.0 SP5


Posted By: mav46
Date Posted: 09 February 2009 at 12:34pm
Originally posted by oleg oleg wrote:

checkControl.Enabled = False


I need somthing like this:



Like the status of the second checkbox ..... but in a xtpControlCheckBox in a RibbonGroup.


-------------
Product: Xtreme SuitePro (ActiveX) 12.1.1
Platform: Win XP (32bit)
Language: Visual Basic 6.0 SP5


Posted By: mav46
Date Posted: 12 February 2009 at 5:30am
Staff Codejock ..., Nothing ?

-------------
Product: Xtreme SuitePro (ActiveX) 12.1.1
Platform: Win XP (32bit)
Language: Visual Basic 6.0 SP5


Posted By: Oleg
Date Posted: 12 February 2009 at 6:24am
Hi,
 
Ohh. grayed... Sorry with ActiveX version you can't make it Grayed. :(


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


Posted By: Aaron
Date Posted: 15 February 2009 at 8:26am
Hi,
 
I'm not that great with Markup... But Jason or Oleg could help you with this...
 
I'm not sure if this is possible:
 
  1. Add label to form (or maybe MarkupLabel)
  2. Build markup string to have 3-state Checkbox
  3. AddHandler (in case of MarkupLabel) or include clickevent in Markup string???
  4. Attach Label or MarkupLabel to Commandbars
  5. Ready
I have come this far:
 
  1. Added Label (set EnableMarkup = True) to PictureBox and PictureBox to form (this wasn't that difficult )
  2. Label1.Caption = "<StackPanel><CheckBox Margin='1' IsThreeState='True' IsChecked='' Padding='0'>3-State Check Box</CheckBox></StackPanel>"
  3. Jason or Oleg
  4. Dim custControl As CommandBarControlCustom
    Set custControl = <Your Toolbar>.Controls.Add(xtpControlCustom, 1, "Checkbox 3-State")
          custControl.Handle = Picture1.hWnd
  5. Ready to go...
 
 

 



-------------
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: jpbro
Date Posted: 15 February 2009 at 8:54pm
I've put together a little demo that uses the Markup control (instead of the Label control). I prefer it because you get access to all of the Markup objects, and they make life a lot easier that messing around with XAML strings. It can handle the standard VB checkbox values, and can use XAML/Markup captions.
I've called the event to test for changing values ValueChanged instead of Click (since it makes more sense this to me), but you could easily change it and add any additional properties/events that you require. The code should demonstrate how to link XAML events to a Usercontrol/Form.

uploads/20090215_205352_MarkupCheckbox.zip - uploads/20090215_205352_MarkupCheckbox.zip


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 16 February 2009 at 1:38am
Hi Jason,
 
Thanks for creating a complete and reusable code
 
Oleg: Could you complete code with adding this to a Ribbon? Then you would have another satisfied customer (I'm sure he/she already was) 
 
Thanks a lot.
 
 


-------------
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: Oleg
Date Posted: 16 February 2009 at 5:19am
Matteo, we updated xtpControlCheckBox to allow xtpGrayed. If its critical for you, drop letter to mailto:support@codejock.com - support@codejock.com , I will build special version for you.

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


Posted By: Aaron
Date Posted: 16 February 2009 at 2:40pm
Hi Oleg,
 
And thanks to you too  I don't know if Jason will be as happy as Matteo
 
Thanks a lot
 
 


-------------
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: mav46
Date Posted: 17 February 2009 at 9:59am
Originally posted by oleg oleg wrote:

Matteo, we updated xtpControlCheckBox to allow xtpGrayed. If its critical for you, drop letter to mailto:support@codejock.com - support@codejock.com , I will build special version for you.


Thank you Oleg, I have already sent the request to support.


-------------
Product: Xtreme SuitePro (ActiveX) 12.1.1
Platform: Win XP (32bit)
Language: Visual Basic 6.0 SP5


Posted By: Aaron
Date Posted: 17 February 2009 at 10:14am
Originally posted by mav46 mav46 wrote:


Thank you Oleg, I have already sent the request to support.
 
Hi,
 
What about Jason? I would thank him also for putting effort into your problem.
 
 


-------------
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: jpbro
Date Posted: 17 February 2009 at 10:28am
Thanks Aaron ;)

I don't need thanks though (although thanks are always nice) - I'm happy to try these challenges out as a learning experience to see what can improve my own software. 


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: mav46
Date Posted: 17 February 2009 at 12:13pm
Originally posted by Aaron Aaron wrote:

Originally posted by mav46 mav46 wrote:


Thank you Oleg, I have already sent the request to support.
 
Hi,
 
What about Jason? I would thank him also for putting effort into your problem.
 
 


... Aaron.., you have totally right ..., Thank you Jason too !


-------------
Product: Xtreme SuitePro (ActiveX) 12.1.1
Platform: Win XP (32bit)
Language: Visual Basic 6.0 SP5


Posted By: jpbro
Date Posted: 18 February 2009 at 1:02pm
No problem Matteo!

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: mav46
Date Posted: 19 February 2009 at 10:48am
Originally posted by oleg oleg wrote:

Matteo, we updated xtpControlCheckBox to allow xtpGrayed. If its critical for you, drop letter to mailto:support@codejock.com - support@codejock.com , I will build special version for you.


Oleg, I have installed the special version of Codejock.CommandBars.v13.0.0.ocx from support, but I still cannot find the property to set xtpCommandCheckbox = xtpGrayed.

Can you help me, please.

Thanks.


-------------
Product: Xtreme SuitePro (ActiveX) 12.1.1
Platform: Win XP (32bit)
Language: Visual Basic 6.0 SP5


Posted By: Oleg
Date Posted: 19 February 2009 at 12:01pm
Just set Control.Checked = 2.

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


Posted By: mav46
Date Posted: 20 February 2009 at 6:55am
Originally posted by oleg oleg wrote:

Just set Control.Checked = 2.


Hi Oleg, ok it works ... but one more question: how can verify if xtpControlCheckBox is set to xtpGrayed ? If I test out the checked property on status xtpGrayed, it return always false .....



[Example]
.....
Dim CheckControl As CommandBarCheckBox ' <- xtpControlCheckBox
.....
CheckControl.Checked = 2 ' <- set status to xtpGrayed
If CheckControl.Checked = 2 Then ' <- ALWAYS FALSE
......
[End]

Thanks.




-------------
Product: Xtreme SuitePro (ActiveX) 12.1.1
Platform: Win XP (32bit)
Language: Visual Basic 6.0 SP5


Posted By: Oleg
Date Posted: 23 February 2009 at 3:43am
Hi,
 
right, you can't :( I changed it.
 
Think now you can create variable and syncronize value with this variable in Update handler.
 
 
 


-------------
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