Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - xtpControlCheckBox status xtpGrayed in Ribbon ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

xtpControlCheckBox status xtpGrayed in Ribbon ?

 Post Reply Post Reply
Author
Message
mav46 View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2006
Location: Italy
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav46 Quote  Post ReplyReply Direct Link To This Post Topic: xtpControlCheckBox status xtpGrayed in Ribbon ?
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 February 2009 at 11:58am
checkControl.Enabled = False
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mav46 View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2006
Location: Italy
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav46 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mav46 View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2006
Location: Italy
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav46 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mav46 View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2006
Location: Italy
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav46 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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: 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 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....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2009 at 5:19am
Matteo, we updated xtpControlCheckBox to allow xtpGrayed. If its critical for you, drop letter to support@codejock.com, I will build special version for you.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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: 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....
Back to Top
mav46 View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2006
Location: Italy
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav46 Quote  Post ReplyReply Direct Link To This Post 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 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
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: 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
mav46 View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2006
Location: Italy
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav46 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
mav46 View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2006
Location: Italy
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav46 Quote  Post ReplyReply Direct Link To This Post 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 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2009 at 12:01pm
Just set Control.Checked = 2.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mav46 View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2006
Location: Italy
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav46 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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.219 seconds.