473,320 Members | 1,974 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,320 software developers and data experts.

Style sheets

I am creating a menu with the ComponentOne tools that come with the
..Net resource kit. I am trying to apply a style sheet to the controls
of the menu but I dont know how. Do I need to add a new style sheet or
can I use the styles.css? If I add a new style sheet, how do I apply
it to the menu controls? There is a property in the properties window
called CssClass but I dont know what to put there. I have never used
style sheets for anything in .net so I am pretty lost. Thanks in
advance.

-Rob
Nov 18 '05 #1
1 1024
The CSSClass property takes a string value. Assume that a Web form has a text box control called "TextBox1", you would set the CSSClass property with this statement: TextBox1.CSSClass="TBStyle". "TBStyle", in this instance, would need to be defined in your style sheet. If you're going to use Styles.css (the default style sheet in a Visual Stuio.NET project) you need to include this directive in the <HEAD> tag in your .aspx page: <LINK href="Styles.css" type="text/css" rel="stylesheet"

From what I've seen, VS.NET does not seem to automate the insertion of the stylesheet directive into an .aspx page in any way. This seems rather curious, since there are so many other nice code-generation features in VS

By the way, once you've established a style sheet, you can instantiate style objects in your code, something like this

Dim MyStyle as New Styl
MyStyle.CssClass="TBStyle

Then, the style objects are usable with the ApplyStyle and MergeStyle methods of individual control objects. Personally, I've found this to be quite useful for getting things to really look the way I want them to

Nov 18 '05 #2

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

Similar topics

12
by: relaxedrob | last post by:
Hi All! I have a page with with the following style information: <link rel="stylesheet" type="text/css" href="/eEmployment/eTech.css" /> <style type="text/css"> DIV.Application {...
12
by: Jarno Suni | last post by:
I want a device to use styles given for media type handheld and not the styles given for media type screen, if the device supports media types handheld and screen. Is it possible without writing...
9
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It...
1
by: mscertified | last post by:
Can anyone explain how references to style sheets work, I've exhausted looking in help, its all so confusing. I have three style sheets in my project under 'Style Sheets'. Only the first style...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a machine running IIS 6.0. I just replaced the web.config and several aspx pages in the application and now the style sheets are not working. the images from the themes work but not the css...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.