Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Task Panel
  New Posts New Posts RSS Feed - Item Font/Animation - RESOLVED
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Item Font/Animation - RESOLVED

 Post Reply Post Reply
Author
Message
griswald88 View Drop Down
Groupie
Groupie


Joined: 16 May 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote griswald88 Quote  Post ReplyReply Direct Link To This Post Topic: Item Font/Animation - RESOLVED
    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?

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 June 2008 at 1:40pm
Hi,
 
Add wndTaskPanel.Reposition after you change font.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
griswald88 View Drop Down
Groupie
Groupie


Joined: 16 May 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote griswald88 Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2008 at 1:42pm
Sorry, forgot to mention that I tried that as well.
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 June 2008 at 1:43pm

Hi,

I Just tred and it works for me...
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
griswald88 View Drop Down
Groupie
Groupie


Joined: 16 May 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote griswald88 Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2008 at 1:45pm
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?
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 June 2008 at 2:46pm
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
Back to Top
griswald88 View Drop Down
Groupie
Groupie


Joined: 16 May 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote griswald88 Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2008 at 2:58pm
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.
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 June 2008 at 3:43pm
Hello,
 
Please attach your whole changed sample here and screenshot what do you see.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
griswald88 View Drop Down
Groupie
Groupie


Joined: 16 May 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote griswald88 Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2008 at 4:02pm
 
Here you go, here is a project and screenshot.
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: 24 June 2008 at 1:20am

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
Back to Top
griswald88 View Drop Down
Groupie
Groupie


Joined: 16 May 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote griswald88 Quote  Post ReplyReply Direct Link To This Post Posted: 24 June 2008 at 7:57am
Ah, that's it! So what is the difference between Item.Font.Bold and Item.Bold?
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: 24 June 2008 at 9:34am
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
Back to Top
griswald88 View Drop Down
Groupie
Groupie


Joined: 16 May 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote griswald88 Quote  Post ReplyReply Direct Link To This Post Posted: 24 June 2008 at 9:35am
Great thanks!!
Back to Top
younicke View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 March 2005
Status: Offline
Points: 107
Post Options Post Options   Thanks (0) Thanks(0)   Quote younicke Quote  Post ReplyReply Direct Link To This Post Posted: 24 June 2008 at 12:43pm
@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.
Back to Top
younicke View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 March 2005
Status: Offline
Points: 107
Post Options Post Options   Thanks (0) Thanks(0)   Quote younicke Quote  Post ReplyReply Direct Link To This Post Posted: 24 June 2008 at 12:52pm
thanks @griswal88
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.172 seconds.