Changing Font Style of List Item At run time


Dim li As New ListItem

For Each li In chklstSubService.Items

If ObjDR("subservicetype") = 0 Then

li.Text--------------- ??????

End If



I want to make the text bold at run time


Regards
Sarika


sarika
0
sarika
11/28/2005 5:10:43 AM
asp.net.getting-started 91979 articles. 3 followers. Follow

4 Replies
543 Views

Similar Articles

[PageSpeed] 44

How about this:

Dim li As New ListItem

For Each li In chklstSubService.Items

If ObjDR("subservicetype") = 0 Then

li.Text = "<b>" & li.Text & "</b>"

End If


Dirty, but it works..!

0
NicButler
11/28/2005 2:34:13 PM
Hi
Try if this works

Dim li As New ListItem
For Each li In chklstSubService.Items
If ObjDR("subservicetype") = 0 Then
li.Attributes.CssStyle.Add("font-weight", "bold")
li.Text--------------- ??????
End If

HTH



Seven Days Without Laughter Makes One Weak
0
maelstorm1983
11/28/2005 5:42:04 PM
Thanx alot i think this will work
sarika
0
sarika
11/29/2005 3:54:11 AM

you can also use javascript to change the font style

eg:(change the font size)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta content="all" name="robots" />
<meta name="Author" content="huobazi@aspxboy.com ,活靶子" />
<meta name="Copyright" content="www.AspxBoy.Com,自由版权,任意转载." />
<meta name="Description" content="www.AspxBoy.Com" />
<meta name="Keywords" content="www.AspxBoy.Com,活靶子,huobazi" />
<title> New New Document</title>

<script  language="javascript">
function  setBarPosition(){
document.getElementById('toolBar').style.top=0
document.getElementById('toolBar').style.left=621
document.getElementById('toolBar').style.display='block'
}

function  setTailPosition(){
var  theHeight=(document.getElementById('toolBar').offsetHeight>document.getElementById('theEnd').offsetTop)  ?  document.getElementById('toolBar').offsetHeight  :  document.getElementById('theEnd').offsetTop
document.getElementById('sinaTail').style.top=theHeight
document.getElementById('sinaTail').style.left=document.getElementById('theEnd').offsetLeft
document.getElementById('sinaTail').style.display='block'
}
</script>
</head>
<script  language="javascript">
function  doZoom(size){
document.getElementById('zoom').style.fontSize=size+'px'
setTailPosition()
}
</script>
</head>

<body>

<table  >
<td  id="mytable"><font  id="zoom"  >
这里是测试的这里是测试的这里是测试的这里
是测试的这里是测试的这里是测试的这里是
测试的这里是测试的这里是测试的这里是测
试的这里是测试的这里是测试的这里是测试
的这里是测试的这里是测试的
这里是测试的这里是测试的这里是测试的这
里是测试的这里是测试的这里是测试的这里
试的这里是测试的</font  ></td>
</table>

【<A  href="javascript:doZoom(16)">大</A> 
<A  href="javascript:doZoom(14)">中</A> 
<A  href="javascript:doZoom(12)">小</A>】

</body>

</html>


Hi, i'm huobazi ^_^
http://www.AspxBoy.Com
http://huobazi.AspxBoy.Com
0
huobazi
11/29/2005 6:14:31 AM
Reply:

Similar Artilces:

Changing a Label's Font Style at run time [Edit]
IW14.0.22Ultimate. DelphiXE4. TIWLabel.OnMouseOver I'd like change the Font.Style to fsunderline. It appears compiler does not like any changes to font style beyond those established at design time. Is there a unit that I'm not including, or if not, does anyone know of any run-time work-arounds short of writing a css or adding the styles to an existing one? Thinking I might outsmart any style sheet or css I set the style as underline at design-time (component and region) so I could clear the style at MouseOver (which works) and then get it back on OnMouseOut, but it didn't...

How do change the Font Name property to the TextBox control at the Run time in .Net 2.0?
Hi., I'm developing a website to support Tamil and English languages at runtime. I'm using Resource files to change the properties of the controls at runtime. There is no Bindable property to change the Font property for the Text Box control. That's my problem. Because I need to change the Font property of the Text Box at runtime. Anybody have any other ideas to change the Font property at runtime? Please Help me...     Advance Wishes for you..............Loganath.V9952070572 Hi, define your differnt font's in a cssfile like thisstyle.css  .text1{f...

superreview granted: [Bug 348155] XUL list items not reporting correct position : [Attachment 233027] 1) When a11y active create frames for all list items from the start, 2) Fix regression where chang
Robert O'Callahan (Novell) <roc@ocallahan.org> has granted Aaron Leventhal <aaronleventhal@moonset.net>'s request for superreview: Bug 348155: XUL list items not reporting correct position https://bugzilla.mozilla.org/show_bug.cgi?id=348155 Attachment 233027: 1) When a11y active create frames for all list items from the start, 2) Fix regression where changed inheritance for listitems messed up GetDescription() for listitems and options https://bugzilla.mozilla.org/attachment.cgi?id=233027&action=edit ...

Dropdown List
Is it possible to change the font per list item.  I have gotten it to change the color and background color with the style per each item but I it is not working when I try to put the font-family in.  The reason I want to be able to do this is have 3 items on the list a green circle, yellow triangle and a red X.  The circle is in the wingding family the triangle being in the wingding 3 family and the X in arial or whatever.  yes - assign each listitem you want to look different to a different css class in c# this would be something like:ListItem item = new ListItem;item....

changing font at run time
hello, I need to change the font type and size of reports depending on the user input. I need some suggestions....Now i am trying as follows. i am using datawindowobject.modify("objectname.font.height=xx") this is working.. to get all available objects in a datawindow ... Using describe(datawindow.objects) i got all objects in a string.. Is there any way to get the number of objects and get the name one by one ..(so that i can put in a loop and change it) any other suggestions also welcome thanks bal A function we had since 3.0. Just import it. (...

how to get the items in a list box when i used jscript to move items from another list box to this list box?
Hello Mate,                   First of all i have 2 list boxes. i am populating the first list box from the database in the load event .and i used jscript to move the items from the first list box to second list box when i click some arrow buttons. now i just want to store the values of the second list box in a datatable and i would like to store that datatable in a session variable.                    If you know any sol...

Change edit style at run time
Hi, Is it possible to change the edit systle of a column at run time based on a condition, like edit to editmask at runtime? Thanks You could place two copies of the column on the datawindow in the same exact place, one as editmask and one as edit. Then put an expression on the visible property of both of them such that only one is visible at a time. A good way to do this is to have a hard coded value in your SQL statement then use SetItem in a script to change the value. The visible expressions would key off the value of this column. <Satish> wrote in message news...

How to change the font in menus at run time?
Hi, How to change the popup or MDI menu item's font at run time in PB, So that the multilanguage feature can be achieved. TIA Sorry for wrong posting ...

Changing styles programatically at run-time
I have a HyperLink control. I don't want its text to be underlined. The typical response to this is "use style sheets". But I don't want to use style sheets; I want to set the Underlined property of the Font object to false, and have that render as a style, just like it does when you set that same property to true. Is this really too much to ask? Or is there a way to make this happen that I haven't found? AutoFed Maybe I'm misunderstanding you ... the font object? Are you talking about the <font> tag? If so, that tag is deprecated and should be avoided. Style sheets a...

How to change the font in menus at run time?
Hi, How to change the popup or MDI menu item's font at run time in PB, So that the multilanguage feature can be achieved. TIA AFAIK, it can't be done solely within your app. There's a registry setting for it, but it uses a long binary value to specify the font and size. And changing that value will affect EVERY menu on your system. Plus, you have to find a way to get Windows to refresh the display before the change will take effect. If you really want to go through all of that, let me know and I'll find the registry key for you. "Ewak" <...

How to change a column Style at running time for datawindow
I have a datawindown with a couple of columns on it. I would like to display one of column in a different Style under different situation. e.g. I want column A to display in a DropDownDW Style when user click on "Browse" button, and I want column A to display in a Edit Style when user click on "Insert" button. I really appreciate if you can show me how? ...

changing style type for a column on run time?
Hello... Using Powerbuilder 7: I have a Window which contains a Data Window control. The Data Window control has two relevant columns: column_a and column_b. At design time, column_b has Edit on Style Type. On runtime, if column_a has a certain specific value, I would like column_b to have the Style Type changed to a DropDownDW using dw_Source as DataWindow, c_display as Display Column, c_Store as Data Column, Always Show Arrow Selected and VScrollBar Selected... If column_a has any other value, I want column_b back to Edit as Style Type. Is this possible? How is the s...

How to change the tool tip font at run time?
Hi, I want to change the tooltip's font at run time based on the user login and display the tooltip text from the tag property. ie., When a user logged in, the tool tip text will be read from .ini file (Seperate .ini file will be maintained for each language.) based on the user's language and set the tool tip text in the tag property which is displayed as tool tip text. I used the API Calls to display the tool tip. But how to change the tooltip font at run time. TIA The font is stored in the registry as some magical binary value. You'll have to use API c...

How to change text of DDLB items at run-time?
I need to change the text of DDLB items (run-time multi-language translation). However, doing something as simple as: ddlb_1.Item[1] = "new text" does not work! According to help, the Item[] property is not updateanle at run-time. My only other alternative is deleting all items and adding them again via AddItem dynamically, but then that does not update the Item[] property, so a lot of logic would have to be rewritten. There has to be a simple solution to such a seemingly straightforward issue. What am I missing here? We're on 6.5.1. TIA, -- -----------...

Web resources about - Changing Font Style of List Item At run time - asp.net.getting-started

Changing room - Wikipedia, the free encyclopedia
A changing room , locker room , dressing room (usually in a sports, theater or staff context) or changeroom (regional use) is a room or area ...

Beyond Timeline: The Changing Face Of Facebook Ads
Despite the hype, timeline may not be the most exciting, or important change coming on March 30. Expanded advertising opportunities may unlock ...

Robert Scoble - Micromedia, how it's changing what we blog - Facebook
Jeremiah Owyang wrote an interesting piece about micromedia and how it's changing what we do on blogs and how we distribute media (er, ideas, ...

8 Ways the Changing Facebook Home Page Will Affect Application Virality
For developers who live and die by the changes Facebook makes to the way information flows through the service, every little Facebook tweak has ...

Changing Lanes (@chginglanes) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Changing the way business decisions are made
We believe that social data has unlimited value, and near limitless application. Today, we’re taking an important step toward unleashing this ...

The Right and Wrong Reasons for Changing Jobs
... your profile is a clue to the folks at LinkedIn that you’re thinking of switching jobs, so don’t be The Right and Wrong Reasons for Changing ...

We're Changing Our Name (Back) to Stack Overflow
We are Stack Overflow. You may know us from such popular websites as Stack Overflow Q&A, Stack Overflow Careers, The Stack Exchange Q&A Network, ...

The Tao of Twitter: Changing your life and business 140 characters at a time - Amazon
It's time to take the mystery out of Twitter. Twitter may be the most powerful business and personal networking platform ever created but it ...

App Store - Voices 2 ~ fun voice changing!
Read reviews, get customer ratings, see screenshots, and learn more about Voices 2 ~ fun voice changing! on the App Store. Download Voices 2 ...

Resources last updated: 12/31/2015 8:08:21 PM