Item Font/Animation - RESOLVED |
Post Reply |
Author | |
griswald88
Groupie Joined: 16 May 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
Posted: 23 June 2008 at 1:35pm |
I am trying to "bold" the active item in a group. The items are of type link and when I set the bold property, it appears to "mess up" the animation/hot tracking. For example, once I bold the active item, the underline is now permanant on the item. When I hover over and off of the item, the underline does not appear and then disappear, rather it is always present. I have tried playing with redraw, but still cannot seem to solve the issue. Ideas? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Add wndTaskPanel.Reposition after you change font.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
griswald88
Groupie Joined: 16 May 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Sorry, forgot to mention that I tried that as well.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, I Just tred and it works for me...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
griswald88
Groupie Joined: 16 May 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Here is my code:
Static bTaskSemaphore As Boolean
Static oLastItem As TaskPanelGroupItem 'lock the redraw tskMain.LockRedraw = True 'unbold last item If Not oLastItem Is Nothing Then oLastItem.Font.Bold = False 'set the font to bold Item.Font.Bold = True 'unlock the redraw tskMain.LockRedraw = False 'set the last item Set oLastItem = Item tskMain.Reposition This does not work for me, do you see something off here? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
hm.
I opened our TaskPanel sample, add same code:
Private Sub wndTaskPanel_HotItemChanged() Dim Item As TaskPanelItem Set Item = wndTaskPanel.HotItem 'lock the redraw wndTaskPanel.LockRedraw = True 'unbold last item If Not oLastItem Is Nothing Then oLastItem.Font.Bold = False 'set the font to bold If Not Item Is Nothing Then Item.Font.Bold = True 'unlock the redraw wndTaskPanel.LockRedraw = False 'set the last item Set oLastItem = Item wndTaskPanel.Reposition End Sub
added wndTaskPanel.EnableAnimation = True
and all look fine. Check it with our sample.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
griswald88
Groupie Joined: 16 May 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Hi Oleg,
Ok, this is very odd, I pasted your code into your sample as well and it still does not work (underline is always present). I am trying to get this to work in the ItemClick event and as a note, I am using the trial version of this control if that has anything to do with it.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Please attach your whole changed sample here and screenshot what do you see.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
griswald88
Groupie Joined: 16 May 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
All work as expected - you set Font that is Underline and Bold. Here code you can use instead:
'unbold last item
If Not oLastItem Is Nothing Then oLastItem.Bold = False 'set the font to bold Item.Bold = True |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
griswald88
Groupie Joined: 16 May 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Ah, that's it! So what is the difference between Item.Font.Bold and Item.Bold?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
With Item.Font.Bold you set custom Font for item - same as
Dim fnt as New StdFont
fnt.Bold = True
Set item.Font = fnt
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
griswald88
Groupie Joined: 16 May 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Great thanks!!
|
|
younicke
Senior Member Joined: 11 March 2005 Status: Offline Points: 107 |
Post Options
Thanks(0)
|
@griswald88
since your issue has been solved. would you be kind enough to edit the title to previous title + SOLVED so as not to confuse other users that this thread has not been solved. i dont know but in some other forums that i am a member of, i can just easily mark my thread as SOLVED. is this possible here? oleg and colleagues? this could make our forum easier to read, i believe. |
|
younicke
Senior Member Joined: 11 March 2005 Status: Offline Points: 107 |
Post Options
Thanks(0)
|
thanks @griswal88
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |