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: How to change the tooltips for a tigra table?
nishanttheone
Junior Member

Posts: 3
Registered: 11/28/2005
Location: India
Member Is Offline
posted on 11/28/2005 at 07:10 AM Reply With Quote
How to change the tooltips for a tigra table?


We are currently doing globalization of our product , which requires us to change the tooltips of the tigra table dynamically.

Can nyone help me with it?
View User's Profile View All Posts By User U2U Member
spw
Member

Posts: 44
Registered: 12/8/2005
Location: Australia
Member Is Offline
posted on 1/16/2006 at 04:51 AM Reply With Quote

The only tooltips I could find in the generic product were for the sorting images in the table.css file. If you add tooltips here for different fields then i suggest building the table.css dynamically using php - had moderate success with php for other things like page counters or dynamically positioning indicators based on the page being built.

Hope that helps....
View User's Profile View All Posts By User U2U Member
nishanttheone
Junior Member

Posts: 3
Registered: 11/28/2005
Location: India
Member Is Offline
posted on 1/16/2006 at 06:06 AM Reply With Quote

I want to modify the tooltips for sorting the columns dynamically depending upon the user's language preferences and environment settings.
View User's Profile View All Posts By User U2U Member
spw
Member

Posts: 44
Registered: 12/8/2005
Location: Australia
Member Is Offline
posted on 1/16/2006 at 06:24 AM Reply With Quote

Yup - Based on previous experience I think php can be used here - you should be able to pass the environment variables to the php script and then set up the tooltip text accordingly... Prerequisite is that your web server has been set up to support PHP.

As an example here is an extract of a PHP script which positions a pointer based on the "calling page" which is being built.

/* And finally add the context indicator */
$whoami=substr($pagetomake,0,4);
$top_offset=4;
switch ($whoami)
{
case "home": $top_px = 30 + $top_offset; break;
case "fenc": $top_px = 58 + $top_offset; break;
case "shel": $top_px = 86 + $top_offset; break;
case "main": $top_px = 114 + $top_offset; break;
case "crse": $top_px = 142 + $top_offset; break;
case "agis": $top_px = 170 + $top_offset; break;
case "hors": $top_px = 170 + $top_offset; break;
case "tids": $top_px = 198 + $top_offset; break;
case "cont": $top_px = 226 + $top_offset; break;
}
print "<div id='Context' style='position:absolute; width:22px; height:18px; z-index:1; left: 155px; top: ";
print $top_px;
print "px;'><img src='images/hheadx.gif' width='22' height='18'></div> </body> </html> ";

As you can see it uses the case switch function to vary the positioning based on the value of the $whoami variable which was derived from a value ($pagetomake) passed to the script when it was invoked.

Have fun.
View User's Profile View All Posts By User U2U Member
nishanttheone
Junior Member

Posts: 3
Registered: 11/28/2005
Location: India
Member Is Offline
posted on 1/16/2006 at 07:01 AM Reply With Quote

Thanks for your reply spw.

But my problem is there is only one page.

When the user wants to see the page in French , he should be able to see the tooltip 'Sort this column' in French.

We can get the tooltips to the code-behind but how to provide it to the tigra control?
View User's Profile View All Posts By User U2U Member
spw
Member

Posts: 44
Registered: 12/8/2005
Location: Australia
Member Is Offline
posted on 1/17/2006 at 12:24 AM Reply With Quote

Regardless of how many pages - the issue is that you have multiple languages/regions. For the user you will only build one page.

Let me explain: The toolltips control is taken from the menu.css when your page with the table is loaded - so the trick is to build the table.css dynamically before the table page is loaded.

Set a variable to the language/region and pass that to the php script that will build the table.css and insert the appropriate tooltips - use the case switch function.
OR
build a separate table.css for each region and use the variable to set up path to the correct one - not such a great solution and is more maintenance intensive.

For the first example this is nothing more than a PHP print statement (for the stuff before the tooltips statment), a conditional print to select the tooltip text in whatever language you have selected), and a final prnt stament for the rest of the .css file.

There are many examples and tutorials on the web about how to do this.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Simple
XP-styled
3D designed
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