Print Page | Close Window

Item Font/Animation - RESOLVED

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=11165
Printed Date: 21 November 2024 at 6:46pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Item Font/Animation - RESOLVED
Posted By: griswald88
Subject: Item Font/Animation - RESOLVED
Date 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?




Replies:
Posted By: Oleg
Date Posted: 23 June 2008 at 1:40pm
Hi,
 
Add wndTaskPanel.Reposition after you change font.


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


Posted By: griswald88
Date Posted: 23 June 2008 at 1:42pm
Sorry, forgot to mention that I tried that as well.


Posted By: Oleg
Date Posted: 23 June 2008 at 1:43pm

Hi,

I Just tred and it works for me...


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


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


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


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


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


Posted By: griswald88
Date Posted: 23 June 2008 at 4:02pm
https://forum.codejock.com/uploads/20080623_160122_CodeJock.zip -
uploads/20080623_160122_CodeJock.zip
 
Here you go, here is a project and screenshot.


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


Posted By: griswald88
Date Posted: 24 June 2008 at 7:57am
Ah, that's it! So what is the difference between Item.Font.Bold and Item.Bold?


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


Posted By: griswald88
Date Posted: 24 June 2008 at 9:35am
Great thanks!!


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


Posted By: younicke
Date Posted: 24 June 2008 at 12:52pm
thanks @griswal88



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