473,770 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

list box caracters format

In a list box I have on each line a combination of string1 + String2.
I want to write string 1 with a colour and string2 with another colour.
I tried to use string1.format but I cannot find any styles arguments for
string.

Is it possible ?
If yes, please give me an example .

regards,
Mihai
Jun 13 '07 #1
2 1370

"Mihai" <bv*****@telus. netwrote in message
news:iGXbi.1815 1$vT6.8430@edtn ps90...
In a list box I have on each line a combination of string1 + String2.
I want to write string 1 with a colour and string2 with another colour.
I tried to use string1.format but I cannot find any styles arguments for
string.

Is it possible ?
If yes, please give me an example .

regards,
Mihai

Mihai,

Colors have nothing to do with strings, that is why you would see no
arguments like that.

Is this a windows app or asp?

For a listview in a windows app you cannot have different colors for the
same item. The string you would provide would be one color not a
combination.

For asp you create a listitem and apply attributes to it to get the back
and fore colors. There is still a restriction that the entire string will
be the fore color so again no multi-color listitems.
Lloyd Sheen

Jun 13 '07 #2
"Mihai" <bv*****@telus. netschrieb:
In a list box I have on each line a combination of string1 + String2.
I want to write string 1 with a colour and string2 with another colour.
I tried to use string1.format but I cannot find any styles arguments for
string.

Is it possible ?
Not out of the box. You may want to take a look at the listbox' 'DrawMode'
property and its 'OnDrawItem' and 'OnMeasureItem' methods, which can be used
to add custom drawing to the controls.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jun 13 '07 #3

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

Similar topics

0
1821
by: Psykotik | last post by:
Hello, I've two problems with php. My spec : Windows XP SP1, KFWS 2.2.0, IE 6 SP1, PHP 4.3.3. Web server is "KF web server", a server very very user friendly (HTML interface), and which manage very well web security. Link : http://www.keyfocus.net/kfws/ But it sounds like my two problems are KFWS related, except if one has
1
2089
by: NickB | last post by:
Please could someone tell me what is wrong. Ther error is: An unhandled exception of type 'System.NullReferenceException' occurred in microsoft.visualbasic.dll Additional information: Object variable or With block variable not set. I am trying to print the contents of a list box on another form. This is the sub, and the highlighted line is where it is falling over.
0
3388
by: serge calderara | last post by:
Dear all, What is the way to retriev the list separattor used by the system ? I am able to retrive the current culture and retrive the currency format, but could not found how to get this list separator caracters. Thanks for your help regards Serge
0
1412
by: Miguelito Bain | last post by:
hi everybody- i've got a conundrum... i inherited some old databases, and i'm trying to convert them. i run office xp with access 2002, and all of the databases i manage are either in 97 format or 2000 format. i have a list box that works in access 97 but not 2000. here's my situation...
1
1875
by: Fabiano | last post by:
Please, i got an XML String that contains some special caracters like linefeed, tab and others. How can i replace this chars? Can i use an ASCII value at the XXX.replace() method? Tks in adv. Fabiano
2
5191
by: alain.hogue | last post by:
I have a table "tblCards" with a field "Titre" that contain french words (Hébert, Gagné, Hélène, etc....) in an database with SQLEXPRESS 2005. I have used the asp:SqlDataSource to filter the SELECT statement according to a Textbox the user can type into. When used with the LIKE condition using any acute caracters the SELECT statement return nothing, unless the acute caracters is replaced with an ampersand "%". Even the underscore "_"...
7
1910
by: arno | last post by:
Hi, I want to search a substring within a string : fonction (str, substr) { if (str.search(substr) != -1) { // do something } }
4
3185
by: Jon | last post by:
Hello all, In my code im using Response.Write(someText) to write out some Japanese text to a new browser window. In the command window, the text is correct, but when the browser window opens it appears as ャーã®エア抜ãÂÂ. Why would this be so? My code is below: Response.ClearHeaders(); Response.ClearContent();
1
1954
by: natural | last post by:
Good Day. I am currently via Form send data to a word template.. I have about 150 bookmarks in a word document which was previously imported via a simular document. and appended into my DB. The data changes etc we export it back for various reasons. I use the following Code: --------------------------------------------------------------------------------
0
9453
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10099
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10036
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.