Results 1 to 9 of 9

Thread: [RESOLVED] Background color

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Location
    Oregon City, Oregon
    Posts
    703

    Resolved [RESOLVED] Background color

    Below is a form with a DGV. As can be seen, the background color for the column headers is white. I do not want them to be white. It is obvious to me that "
    .ColumnHeadersDefaultCellStyle.BackColor = Color.Wheat"
    is not correct. I have attempted numerous other approaches with no better results. So exactly what can I do to get the background color of the header columns to be what I want them to be.


    Code:
            With dgvSignList
                .Enabled = False
                .BackgroundColor = Color.Tan
                .EnableHeadersVisualStyles = True
                .ColumnHeadersVisible = True
                .BorderStyle = BorderStyle.None
                'Headers
                .ColumnHeadersDefaultCellStyle.Font = New Font("Times New Roman", 11, FontStyle.Bold)
                .ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
                .ColumnHeadersDefaultCellStyle.BackColor = Color.Wheat
                'Cells
                .DefaultCellStyle.Font = New Font("Times New Roman", 11, FontStyle.Regular)
                .DefaultCellStyle.ForeColor = Color.Black
                .DefaultCellStyle.BackColor = Color.AntiqueWhite
                .DefaultCellStyle.SelectionBackColor = Color.AntiqueWhite
                .DefaultCellStyle.SelectionForeColor = Color.Black
                .DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft
            End With
    Name:  SignList.jpg
Views: 373
Size:  19.9 KB

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: Background color

    This is yet another example of why you should read the documentation. The documentation for the ColumnHeadersDefaultCellStyle property has this to say:
    If visual styles are enabled and EnableHeadersVisualStyles is set to true, all header cells except the TopLeftHeaderCell are painted using the current theme and the ColumnHeadersDefaultCellStyle values are ignored.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Location
    Oregon City, Oregon
    Posts
    703

    Re: Background color

    I have read the documentation available to me over and over. It does NOT give any meaningful or useful information. So quit playing that crap card. You have no idea what is done by me or anyone else when attempting to resolve an issue. However, in your rather ambiguous statement I can see that while you were trying desperately to not provide meaningful information you fouled up and let it out that the EnableHeadersVisualStyles should be set to False instead of True. I would have to go back and check a previous post, but without looking, I had thought that you previously stated that it should be set to True. But I would have to check to make sure and I am not going to do that. Anyway, thanks, even though you were not attempting to be helpful.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: [RESOLVED] Background color

    I suggest that you get over yourself. Do you really think that it was an accident that I provided information that helped you solve your issue? You REALLY think that? If not, why did you say it? I have a fair idea.

    Furthermore, you say that you read the documentation and yet the information that I provided, which you say helped you solve your issue, was a direct copy and paste from the documentation. That means that either you didn't read it or else you did read it and didn't notice that it addressed your issue. I'm not sure which is worse.

    As for whether I previously posted that you should set that property to True, I have no recollection of that but, if I did, I doubt that it was in relation setting the BackColor. If it was then I was wrong and I apologise for that but I've never claimed to be right every time anyway. Clearly you'd have seen that that recommendation was incorrect if you had read the documentation and done so properly.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Location
    Oregon City, Oregon
    Posts
    703

    Re: [RESOLVED] Background color

    I might take that under consideration JM. And perhaps you might be willing to follow your own suggestion as well. No JM, I did not think it was an accident, but as always any useful information you provide comes with game playing, condescending crap with a heaping dose unwarranted and misinformed accusations of laziness and stupidity. Quite frankly JM, you express all of the attributes that are seen in a bad instructor who is not interested in teaching or in their students learning. You obviously do not like how I respond. I do not like how you address what you call help. Do you think there might be a correlation there buddy?

    You frequently make reference to, "The documentation", JM. Perhaps you might be willing to supply the required information as to what documentation you are referring to, where it can be found and who it is that created that documentation. Just saying read the documentation provides nothing at all JM. It is just another aspect of your game playing, condescending crap and shows that you are lazy and do not really want to help. Fine.

    As for what you previously posted, I cannot, without looking it up, say for sure whether I am correct about that. It is merely as I recall. So it might well not have been about setting BackColor and might well have been something entirely different. That is irrelevant anyway.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: [RESOLVED] Background color

    Quote Originally Posted by gwboolean View Post
    Quite frankly JM, you express all of the attributes that are seen in a bad instructor who is not interested in teaching or in their students learning.
    Except that I'm not an instructor. When I was at school and university, my fellow students used to say that I'd make a good teacher because I had the ability to convey complex topics in an easily understandable way. I always knew that they were wrong about my being a good teacher though, because I knew that I didn;t have the patience for it. Neither of those things has changed. If people are posting here then I expect them to take a certain amount of responsibility for themselves. I'm not being paid to make things easy for them. If I was then I would undoubtedly approach things differently. If someone is a student then they already have a teacher and if they're a developer then they should already know how to do certain things for themselves.
    Quote Originally Posted by gwboolean View Post
    You frequently make reference to, "The documentation", JM. Perhaps you might be willing to supply the required information as to what documentation you are referring to, where it can be found and who it is that created that documentation.
    If I just meant search the web then that's what I would have said. The documentation for any hardware or software is the instructions that come with it. You want to write software yourself and you have been using Windows software for some years I expect and yet you don't know to use the Help menu to get help? Also, if you're so confused and aggravated by my repeatedly referring to "the documentation", I have to wonder why it's taken you until now to ask what I meant by it.
    Quote Originally Posted by gwboolean View Post
    Just saying read the documentation provides nothing at all JM. It is just another aspect of your game playing, condescending crap and shows that you are lazy and do not really want to help.
    It should make it clear to someone that, in my opinion, they should read the documentation. If they don't know what I mean and they ask me, I'll tell them, which I have done on many previous occasions. If they don't tell me that they don't know what I mean, how exactly would I know that they don't know what I mean? The aim of my post was to give you the information you needed to solve your problem (which you even admitted I actually did, even though you tried to claim that it was an accident on my part, smh) and also to demonstrate that you could have found it for yourself with very little effort. All I did was select Help > View Help from the VS main menu, type ColumnHeadersDefaultCellStyle into the index, click on the matching item in the list and there was the information. That took me about 20 seconds. If it's condescending of me to assume that you're capable of doing that too then I'd have to assume that software development is beyond you. For the record, I don't think that software development is beyond you and I don't think that you're incapable of doing what I did - what I've been doing since the very first time I used VS - so I still have to wonder why you didn't. My guess is that, like many other people, your first thought is what others can do for you rather than what you can do for yourself. If that's not the case then I simply have no explanation of why you wouldn't be using the Help menu.

    That said, I do make such posts with the intention of their being a bit of a sting and I've said so on more than one occasion in the past. The reason for that is that, the next time someone finds themselves in a similar position, I want them to remember that sting and want to avoid it again, and so do as I recommended to avoid it. Some people react well to that. Some are determined to avoid any responsibility for their own plight and deny that they possibly could have done more to help themselves. If those people feel bad as a result of my posts, I can live with that. If I was to simply spoon-feed people what I think that they could easily find for themselves, I will be encouraging them to do the same again next time. It's my aim to discourage that. I want everyone who posts here to be the best developers they can be and that means being able to solve their own problems - especially simple problems - as often as possible. That's the reason I post here, not to make friends. Don't like it? That's your prerogative.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Location
    Oregon City, Oregon
    Posts
    703

    Re: [RESOLVED] Background color

    No JM, you are absolutely not an instructor. That is a very good thing. However, whether you like it or not, your role here is equivalent to that of an instructor. It is time that you understand that people use this, and other, forums for help with issues that they do not comprehend. Your expectation of responsibility is nothing more than intellectual arrogance and laziness JM. Plain and simple.

    Your role here is to provide help, not make yourself feel better by not making it easy for those who are seeking enlightenment. Whether you are paid or not, game playing and intellectual arrogance is not appropriate. It is truly sad that you are unable to grasp your role and your inability to be a professional at what you do. Bottom line Jim, is if you are working in a profession then damn it be a professional and cut the crap.

    JM, it is good that you finally described what, "The Documentation", you frequently refer to is. As for your claim that the instructions that come with any hardware or software is what this, "Documentation", is then you are woefully being disingenuous. We all know that the instructions that come with any hardware or software, when it even exists, is at its very best extremely lacking in content and poor in the quality of the information provided. Surly you are not suggesting that anyone could obtain more than a minimum of poor information from instructional material accompanying hardware or software? JM, don't be an ass, of course I know how to use search engines, knowledge bases, etc. They are only as good as a person's base knowledge and it is ONLY through a lot of repetitive usage that anyone is able to even marginally get adequate information from them. Once again, you revert to assumptions you obviously know nothing about in order to support your completely wrong conclusions about everyone else. And JM, that is simply pathetic your reference to wondering why it's taken me so long to ask what I meant by it. But on the other hand, one has to wonder why you never bothered to explain yourself until it was requested?

    JM, your advice to get over myself is something that you would do very well to follow yourself. If you are going to pretend to be a professional then start acting like a professional. Games and pseudo justifications to obfuscate and act like an ass only suggests that you are insecure in your knowledge.

    And yes Jim it is my prerogative which I have no problem exercising when I run across those who are unable to act or be professional and are unwilling to treat others with the same respect and consideration that they themselves expect.

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: [RESOLVED] Background color

    Quote Originally Posted by gwboolean View Post
    However, whether you like it or not, your role here is equivalent to that of an instructor. It is time that you understand that people use this, and other, forums for help with issues that they do not comprehend. Your expectation of responsibility is nothing more than intellectual arrogance and laziness JM.
    <irony>So the people who answer questions have a responsibility but the people asking them have none?</irony> <sarcasm>Got it!</sarcasm>
    Quote Originally Posted by gwboolean View Post
    Your role here is to provide help
    Which I did. Next.
    Quote Originally Posted by gwboolean View Post
    However, whether you like it or not, your role here is equivalent to that of an instructor. It is time that you understand that people use this, and other, forums for help with issues that they do not comprehend. Your expectation of responsibility is nothing more than intellectual arrogance and laziness JM.
    So the people who answer questions have a responsibility but the people asking them have none. Got it!
    Quote Originally Posted by gwboolean View Post
    Bottom line Jim, is if you are working in a profession then damn it be a professional and cut the crap.
    My profession is developing software. When it comes to helping on forums, that's purely a hobby.
    Quote Originally Posted by gwboolean View Post
    We all know that the instructions that come with any hardware or software, when it even exists, is at its very best extremely lacking in content and poor in the quality of the information provided. Surly you are not suggesting that anyone could obtain more than a minimum of poor information from instructional material accompanying hardware or software?
    Do we know that? How can that be the case when I've been using the VS documentation to solve my problems and those of others for well over a decade? I wouldn't deny that plenty of documentation is poor but clearly that's not true in this case so what you supposedly know is an inaccurate generalisation.
    Quote Originally Posted by gwboolean View Post
    JM, don't be an ass, of course I know how to use search engines, knowledge bases, etc. They are only as good as a person's base knowledge and it is ONLY through a lot of repetitive usage that anyone is able to even marginally get adequate information from them. Once again, you revert to assumptions you obviously know nothing about in order to support your completely wrong conclusions about everyone else.
    I agree that using the VS documentation makes you better at using it. That's exactly why I keep telling people to always use it first and to keep using it in future, even if they don't find what they want or don't understand what they find. To claim that I'm making assumptions about things I don't understand couldn't be further from the truth. You seem to be ignoring the fact that I was a beginner once too and I'm only telling people to do what I did. It's not an assumption. It's personal experience. When I first started answering questions on this forum, I was repeatedly able to answer other people's questions on subjects I had no prior experience with, simply because I read the appropriate documentation. You are utterly wrong on that count. This is very much a case of do as I do.

    In this particular case you even wrote ColumnHeadersDefaultCellStyle in your question so please don't waste your time trying to claim that you couldn't have known what to look for. If you are having trouble with a particular type or member then you look for the documentation on that type or member. You can even click it in code and press F1 to be taken directly to it.

    The fact is that, whatever else may or may not be true, I was able to provide information that you used to solve your problem by taking a keyword from your own question and pasting it into the documentation index and reading a few lines. It took me well under a minute. If you had done it for yourself then maybe it would have taken you a bit longer because, as we've already established, my years of experience of using the documentation has made me better at doing so. You too can be that good, but you'd have to use it first. You can think what you like of me but the fact remains that, if you take my advice, you would have been able to solve this problem and there will be plenty of others that you will also be able to solve for yourself. You can cut off your nose to spite your face and refuse to do so because it came from me, or you can help yourself and admit that you can do better.

    I will post nothing further to this thread.

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Location
    Oregon City, Oregon
    Posts
    703

    Re: [RESOLVED] Background color

    <irony>So the people who answer questions have a responsibility but the people asking them have none?</irony> <sarcasm>Got it!</sarcasm>
    JM, you once again prove to be one of the biggest asses around. I rest my case.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width