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

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 1359

"Mihai" <bv*****@telus.netwrote in message
news:iGXbi.18151$vT6.8430@edtnps90...
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
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...
1
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...
0
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...
0
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...
1
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...
2
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...
7
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
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
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
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...

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.