Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Text Styles
corduroy
Junior Member

Posts: 3
Registered: 9/16/2004
Member Is Offline
posted on 9/16/2004 at 08:07 PM Reply With Quote
Text Styles


Does anyone know how I can get the styles in the tree_tpl.js file to overwrite the default text colors set in the main html page.

I would like the text color to change when a node or leaf is selected, but it will not overwrite the alink and vlink color set in the main html page.

thanks.
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 9/17/2004 at 08:14 AM Reply With Quote

You could use style classifiers like:
.t0i {...}
.t0i a:link {...}
.t0i a:visited {...}
.t0i a:hover {...}
.t0i a:active {...}
View User's Profile View All Posts By User U2U Member
corduroy
Junior Member

Posts: 3
Registered: 9/16/2004
Member Is Offline
posted on 9/17/2004 at 07:49 PM Reply With Quote

This works, but the problem is it permanently changes the colors of the links. The colors do not change back after another menu item is selected.

I'm trying to make it so that the text changes color when a menu item is selected to let the user know what they currently have selected, do you know what the best way is to go about this?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 9/18/2004 at 10:59 AM Reply With Quote

Style of the selected item is changed in the item_select function, where you could find instuction:
function item_select (b_deselect) {
//...
get_element('i_txt' + this.o_root.n_id + '_' + this.n_id).style.fontWeight = b_deselect ? 'normal' : 'bold';
//...
}
You could use it as a pattern to apply your own style changes.

Note: PRO version has powerful facilities to change item's text style in any acceptable states via CSS classes.
View User's Profile View All Posts By User U2U Member
corduroy
Junior Member

Posts: 3
Registered: 9/16/2004
Member Is Offline
posted on 9/21/2004 at 09:42 PM Reply With Quote

Actually, all I did was define only the vlink color and that seemed to work. Thanks for all your help.
View User's Profile View All Posts By User U2U Member
Rambabu Kodali
Member

Posts: 11
Registered: 11/18/2004
Member Is Offline
posted on 12/2/2004 at 05:25 AM Reply With Quote
item_select ?


can u please tell me where exactly i have to use this function and how to use.



Style of the selected item is changed in the item_select function, where you could find instuction:
function item_select (b_deselect) {
//...
get_element('i_txt' + this.o_root.n_id + '_' + this.n_id).style.fontWeight = b_deselect ? 'normal' : 'bold';
//...
}
You could use it as a pattern to apply your own style changes.


Thanks
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 12/2/2004 at 09:35 AM Reply With Quote

This function is already defined in tree.js file. In the previous post I've commented all functionality except the style changing. You can see how bold style is applied and use the pattern to apply your own style changes.
View User's Profile View All Posts By User U2U Member
Rambabu Kodali
Member

Posts: 11
Registered: 11/18/2004
Member Is Offline
posted on 12/2/2004 at 10:09 AM Reply With Quote
item_select is not in tree.js


We don't have item_select in tree.js files. Can you please tell me how to make selected text bold with out calling this event.

Thanks.
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 12/2/2004 at 01:55 PM Reply With Quote

Are you using PRO version or free one?
For PRO version you should setup corresponding styles (use font-weight: bold; to bold text) and assign them via template (tree_tpl.js) to appropriate items categories.
View User's Profile View All Posts By User U2U Member
Rambabu Kodali
Member

Posts: 11
Registered: 11/18/2004
Member Is Offline
posted on 12/3/2004 at 08:39 AM Reply With Quote
How to make selected node text bold?


Hi, Can you more specific.

I am using Pro version

I am explaining how i was doing

I defined style in CSS like
.tb {
font-family: Tahoma, Verdana .....
font-size : 12px
font-weight : bold
color : #000000;
.......
}

and i am assigning this style to following style elements:

style_52 = "tb" for selected root caption style

style_20 = "tb" for selected node caption style

style_4 = "tb" for selected leaf caption style

I am applying css to tree.

Is this correct way ?

Can you give me more specific details
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 12/3/2004 at 10:59 AM Reply With Quote

Please find the sample in the attachment

Attachment: bold_style.zip (1.07kb)
This file has been downloaded 895 times
View User's Profile View All Posts By User U2U Member
Rambabu Kodali
Member

Posts: 11
Registered: 11/18/2004
Member Is Offline
posted on 12/8/2004 at 04:22 AM Reply With Quote

Hi,

I downloaded the above zip file and applied the same css and the styles. Still i am unable to make selected node text bold.

Thanks
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 12/8/2004 at 09:20 AM Reply With Quote

Make sure you have no global style settings for anchors
View User's Profile View All Posts By User U2U Member
Rambabu Kodali
Member

Posts: 11
Registered: 11/18/2004
Member Is Offline
posted on 12/10/2004 at 10:01 AM Reply With Quote

Hi,

I have not used the following styles, still selected node text is not getting bold.


<style>
a, A:link, a:visited, a:active
{color: #0000aa; text-decoration: none; font-family: Tahoma, Verdana; font-size: 11px}
A:hover
{color: #ff0000; text-decoration: none; font-family: Tahoma, Verdana; font-size: 11px}
p, tr, td, ul, li
{color: #000000; font-family: Tahoma, Verdana; font-size: 11px}
.header1, h1
{color: #ffffff; background: #4682B4; font-weight: bold; font-family: Tahoma, Verdana; font-size: 13px; margin: 0px; padding: 2px;}
.header2, h2
{color: #000000; background: #DBEAF5; font-weight: bold; font-family: Tahoma, Verdana; font-size: 12px;}
.intd
{color: #000000; font-family: Tahoma, Verdana; font-size: 11px; padding-left: 15px; padding-right: 15px;}
</style>


Thanks
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 3/8/2005 at 12:02 AM Reply With Quote

Solution to the font settings issue is provided in the product documentation at:

http://www.softcomplex.com/products/tigra_tree_menu_pro/docs/#styles
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Tigra Tree Menu
Product Demonstrations Live Demos:
Frames targeting
Win help style
Free Download Free Download
Free Download Menu Builders
Online Builder
Product Documentation Documentation:
Documenation Page
Support Forum Technical Support
Support Forum
   
Tigra Tree Menu PRO
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004