Hi Greg,
I performed a test based on your code and I didn't see the problem you
mentioned. When I click on a button cell, a Color dialog appears. After I
select one color in the dialog and press the OK button, the button cell's
back color is changed with the color I selected and the integer
representing the color is written on the button cell.
Whether I use the statement
"TblCompositionDataGridView.CurrentRow.Cells(e.ColumnIndex).Style.BackColor
= MyDialog.Color" or apply a new style on the cell, I always get the above
correct result.
The version of VS on my machine is 8.0.50727.42 (RTM.050727-4200) and the
version of OS is Windows Server 2003 Enterprise Edition SP1.
Could you tell me the version of VS and OS on your machine?
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Greg P - 24 Aug 2006 16:29 GMT
Linda,
I have the same version of VS but I am running Windows XP Pro SP2? I just
retested to make sure I didn't make a mistake yesterday and I'm seeing the
same issue. I'm not sure what step to take next? I could send you a screen
shot, but I don't think that would matter?
Thanks,
Greg
> Hi Greg,
>
[quoted text clipped - 37 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Greg P - 24 Aug 2006 16:41 GMT
Linda,
XP buttons are the problem. I went to my Display settings and changed the
buttons from Windows XP Style to Windows classic style and I am seeing the
correct behavior. Do you have an XP box to test on your side to reproduce
with?
Thanks,
Greg
> Hi Greg,
>
[quoted text clipped - 37 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Greg P - 24 Aug 2006 17:04 GMT
Linda,
One more strange area, if you switch from Windows Classic Buttons to Windows
XP buttons while VS is running the program then we see different behavior.
There is a small outlying area around an XP button (or it may just be under
the xp button and I'
m seeing what is exposed) that turns color. This only happens if you change
during the middle of the run, otherwise you don't see any color change with
the line of code:
TblCompositionDataGridView.CurrentRow.Cells(e.ColumnIndex).Style.BackColor
= MyDialog.Color
But... there is always a but huh? If you do SelectedBackColor when using
windows XP buttons you see the same outlying area colored. This looks like a
bug to me...
Thanks, let me know if you can reproduce.
Greg
> Hi Greg,
>
[quoted text clipped - 37 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Linda Liu [MSFT] - 25 Aug 2006 09:18 GMT
Hi Greg,
Thank you for your prompt response. It's very pleasant to work with you.
I do reproduce the problem when I turn on Windows XP style on my machine.
The color is only displayed around the button cell.
However, I don't think this is a bug. When we turn on Windows XP style, the
application will adopt this style preferentially. If you like, you could
disable the Windows XP style in the application solely. To do this, right
click the project node in the Solution Explorer and select Properties
command from the shortcut menu. In the Project Designer, go to the
Application tab and clear the checkbox of the Enable XP visual styles
option in the Windows application framework properties groupbox.
Hope this helps.
If you have any concerns, please feel free to tell me.
Sincerely,
Linda Liu
Microsoft Online Community Support
Greg P. - 31 Aug 2006 16:27 GMT
Linda,
I do think this is a bug and I have reported it. You have answered all of
the questions that you can here though. Thanks for your time.
Greg
> Hi Greg,
>
[quoted text clipped - 18 lines]
> Linda Liu
> Microsoft Online Community Support