473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

ASP .NET Users Desktop Themes

I am writing an ASP .NET application. Controls such as Listbox and combo box
pick up the Users Themes from there PC and display selected items using such
selected highlight colors.

I have a table which the user can scroll through and also has mousein -
mouseout events which changes the color as they scroll. This does not pick
up the user's theme color (it is defined in the style sheet). I would rather
this be the Users Theme color. Why? Because I have a table on the same page
as a Listbox and depending on the users theme, they both select with
different colors. It doesn't look nice

Question:
1. Is there a way to modify the listbox selected item color (I don't think
there is, unless I write a custom control, which is not an option). And I
mean the selected color (onclick), not background, forecolor). I know I could
use the html listbox and modify the style, however, there does not seem to be
a way to modify the 'selected item'

2. Is there an API call I can make (using VBSCRIPT on the client, or
JSCRIPT) that can pick up the users theme and get the 'selecteditem' color.

Its just cosmetics, but it makes a difference.
Thanks, Dianna

Nov 19 '05 #1
4 1300
I do not think there is a way to override the system's Selected Item color.
Depending on your desktop theme, this color may vary, but I have not found a
way to alter this programatically. You can get each option's style or class
values using something like the following.

code to use onClick or onChange, ect.
this[selectedIndex].value;
this[selectedIndex].setAttribute('className','SelectedItem');
this[selectedIndex].getAttribute('className');

<select name="lstDepartment" size="1" multiple>
<option value="1" class="Item">Marketing</option>
<option value="2" class="Item">Sales</option>
<option value="4" class="Item">Executive</option>
<option value="5" class="Item">IT</option>
</select>

--
Alex Mueller
"Dianna" <Di****@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
I am writing an ASP .NET application. Controls such as Listbox and combo box pick up the Users Themes from there PC and display selected items using such selected highlight colors.

I have a table which the user can scroll through and also has mousein -
mouseout events which changes the color as they scroll. This does not pick up the user's theme color (it is defined in the style sheet). I would rather this be the Users Theme color. Why? Because I have a table on the same page as a Listbox and depending on the users theme, they both select with
different colors. It doesn't look nice

Question:
1. Is there a way to modify the listbox selected item color (I don't think there is, unless I write a custom control, which is not an option). And I
mean the selected color (onclick), not background, forecolor). I know I could use the html listbox and modify the style, however, there does not seem to be a way to modify the 'selected item'

2. Is there an API call I can make (using VBSCRIPT on the client, or
JSCRIPT) that can pick up the users theme and get the 'selecteditem' color.
Its just cosmetics, but it makes a difference.
Thanks, Dianna

Nov 19 '05 #2
Not via Javascript. One would have to snoop at some obsecure registry
key or API call most likely to retrieve this information.

Nov 19 '05 #3
I agree with what the other posters have said...certainly can't access
user's theme via client script..perhaps an activex control however...as for
the highlighted colour, take a look at
http://www.mhavila.com.br/topicos/web/css_tabelas.html it's in spanish..but
if you scroll all the way down, you'll see a box with a different hover
highlight, which is achieved, I would assume, via the :hover CSS flag..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Dianna" <Di****@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
I am writing an ASP .NET application. Controls such as Listbox and combo box pick up the Users Themes from there PC and display selected items using such selected highlight colors.

I have a table which the user can scroll through and also has mousein -
mouseout events which changes the color as they scroll. This does not pick up the user's theme color (it is defined in the style sheet). I would rather this be the Users Theme color. Why? Because I have a table on the same page as a Listbox and depending on the users theme, they both select with
different colors. It doesn't look nice

Question:
1. Is there a way to modify the listbox selected item color (I don't think there is, unless I write a custom control, which is not an option). And I
mean the selected color (onclick), not background, forecolor). I know I could use the html listbox and modify the style, however, there does not seem to be a way to modify the 'selected item'

2. Is there an API call I can make (using VBSCRIPT on the client, or
JSCRIPT) that can pick up the users theme and get the 'selecteditem' color.
Its just cosmetics, but it makes a difference.
Thanks, Dianna

Nov 19 '05 #4
Thanks everyone.

"Karl Seguin" wrote:
I agree with what the other posters have said...certainly can't access
user's theme via client script..perhaps an activex control however...as for
the highlighted colour, take a look at
http://www.mhavila.com.br/topicos/web/css_tabelas.html it's in spanish..but
if you scroll all the way down, you'll see a box with a different hover
highlight, which is achieved, I would assume, via the :hover CSS flag..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Dianna" <Di****@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
I am writing an ASP .NET application. Controls such as Listbox and combo

box
pick up the Users Themes from there PC and display selected items using

such
selected highlight colors.

I have a table which the user can scroll through and also has mousein -
mouseout events which changes the color as they scroll. This does not

pick
up the user's theme color (it is defined in the style sheet). I would

rather
this be the Users Theme color. Why? Because I have a table on the same

page
as a Listbox and depending on the users theme, they both select with
different colors. It doesn't look nice

Question:
1. Is there a way to modify the listbox selected item color (I don't

think
there is, unless I write a custom control, which is not an option). And I
mean the selected color (onclick), not background, forecolor). I know I

could
use the html listbox and modify the style, however, there does not seem to

be
a way to modify the 'selected item'

2. Is there an API call I can make (using VBSCRIPT on the client, or
JSCRIPT) that can pick up the users theme and get the 'selecteditem'

color.

Its just cosmetics, but it makes a difference.
Thanks, Dianna


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Full Decent | last post by:
Hey again! In my quest to make proper use of OO PHP I would like to ask for a critique of the current method of doing themes in the Camera Life (http://fdcl.sf.net) software and see if an OO...
4
by: Sean | last post by:
My experience now working with master pages on and off for 6 months is that they can be very dangerous when working with themes. One example in particular is the changes I made to my banner menu...
6
by: Clinton Farleigh | last post by:
Hi, I was going to ask a question, but I think I've answered it so now I am going to rant about how crappy ASP.NET themes are instead. As I've indicated above, my problem today is with themes....
0
by: Phil Galey | last post by:
I created a desktop application in VB.NET and in the Setup and Deployment project, under File System on Target Machine, I added a custom folder which is to be added to the Desktop of All Users. To...
3
by: WT | last post by:
Hello, I need to list all available themes for a .NET app, is there any API in ..NET2 for this or should I explore the folder files using IO methods ? Thanks for indication CS
1
by: cefrancke | last post by:
I have a Back End database (split) that is on a smokin' hot machine (dual processor, 2 gig RAM, XP Pro SP2) and I'm getting an error that says the database (back end file) is "opened exclusively"...
11
by: New Bee | last post by:
Hi, I have been looking at Themes and Skins today and now resonably understand how they work at a ground level. But I have a couple of questions. 1. ) StyleSheetTheme I dont understand...
2
by: mike | last post by:
Hi. I am having trouble grasping the concept of applying a consistent theme to an ASP.net website. I didn't used to like ASP because it was too hard to apply a theme from a common theme folder like...
1
by: Cramer | last post by:
Using 3.5: Suppose I have defined 20+ themes (including multiple graphics, ..skin files, and css files per theme), and I want to make those themes *available* to all the Web sites on my Web server....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.