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

Windows Forms - ListView fonts being reset on select

Hi everyone,

I'm having an issue that after days of tweaking continues to bother me. I have a VB application that has a ListView object, with a number of items whose fonts are set based on their priority to the user. The high priority items get bolded, and are meant to stay that way until the user activates them. The fonts are assigned at run-time, using the following type of code:

Dim fntFont As Font

fntFont = New Font(lvList.Font, lvList.Font.Style Or FontStyle.Bold)
...
lvListItem.Font = fntFont


This works fine on most machines, but on some new machines used by my company, a problem comes up. When the ListView loads, all items that are supposed to be bold are instead the default font of the ListView. When scrolling through the list, items that start off screen are correctly bolded, but as soon as they are highlighted, they reset to the default again. Both machines appear to be using the same version of the .NET framework, and there is nothing in the code that should cause this type of behaviour. Any ideas on what could be causing this? Any help is appreciated.
Apr 24 '08 #1
0 802

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Olli Krollmann | last post by:
hello folks, we have been developing several .NET-based windows forms applications during the last two years. there are two mysterious display problems that we have encountered so far but have...
5
by: Saso Zagoranski | last post by:
Hi! I would like to know whether there is a component included in .net fw, which resembles Windows explorer table, where you have: filename file size ... Or has anyone else created...
15
by: Wiktor Zychla | last post by:
today we've found a critical issue regarding the ListView from Windows.Forms. it was confirmed on several machines with Win2K and XP. here's the problem: create a ListView with about 50000 rows....
2
by: Aaron Queenan | last post by:
Is there any way to know whether the OnItemCheck is being called in response to a user action (mouse or keyboard) as opposed to the form loading? I have a class which derives from...
2
by: Joe Pacelli | last post by:
Okay I'm trying to write an application to monitor a running process. Right now I have a front end which allows the user to pick the programs they want to monitor. The interval between how often I...
2
by: Raed Sawalha | last post by:
i have a windows form(Main) with listview, when click an item in listview i open other window form (Sub) which generate the selected item from parent window in as treeview items when click any item...
2
by: Terry Olsen | last post by:
Does anyone have an example of how I could print a ListView control? It'd sure be easier to do this than to try to format the output in DrawStrings... Thanks.
2
by: Ryan Liu | last post by:
Hi, Can someone give me a hlep on inherited user control? I try to inherite windows forms user control, like ListView. From Visual studio 2003, I right click a folder and selct "Add...
10
by: RobinS | last post by:
Hello to all, and happy new year! I have this application that someone wrote that I'm sort of checking out. The forms look fine in design mode, but when I run the application, it crops off the...
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.