Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 25th, 2007, 05:53 PM
Authorized User
 
Join Date: Feb 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Column of a Grid Gray in Color

Hi All,
       I have been working in VB 6.0 for two months now.I've a problem.
I've added a checkbox on the Tab of Grid to enable and disable few columns in a Grid,which seems to be working fine. However, I'm unable to turn those disabled columns in Gray color, when I check that checkbox. Following is the code, which I'm writing to disable the column of a Grid.

grdTyln(jIndexGridTyln).Columns.Item(cACTRANSLINE) .AllowFocus = False

I would appreciate very much, if someone can help.

Thanks

 
Old April 26th, 2007, 07:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

you are not disabling that columm.. you are just not allowing the focus to reach it, meaning that maybe not by keyboard but probably with the mouse you can reach them...

you have to use enable = false to disable them....

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
 
Old April 26th, 2007, 02:05 PM
Authorized User
 
Join Date: Feb 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Gonzalo
           Appreciate your time to reply. The column below the checkbox gets disabled, when I check the checkbox on the Tab of that Grid. I cannot even uncheck/check any checkbox in that column even using mouse, I've tried that. So, I guess, AllowFocus is disabling the column properly.
Moreover, after this line of Code, when I put a dot(.), it doesn't give me disable Option.

grdTyln(jIndexGridTyln).Columns.Item(cACTRANSLINE) .


I would appreciate if you could come up with some other idea.

Thanks very much

Shailesh

 
Old April 26th, 2007, 02:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

are you using the standard datagrid?? also are you working in vb6 or vb.net?

another idea.. is there is only a checkbox with no text then you probably won't see the checkbox grayed..

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
 
Old April 27th, 2007, 12:59 PM
Authorized User
 
Join Date: Feb 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Gonzalo,
           I'm using the standard datagrid. I'm working in VB 6.0 . The checkbox has text with it like on a general form you see. That Checkbox is never grayed out, because I want it to be enabled always to enable/disable the data grid below.

Thanks

Shailesh






Similar Threads
Thread Thread Starter Forum Replies Last Post
how data grid of vb.net add cell color Nuwang Forum and Wrox.com Feedback 0 September 10th, 2008 08:36 PM
Column color issue zone Excel VBA 4 September 4th, 2007 11:59 AM
How to change the color of list control's column gemini Visual C++ 1 August 28th, 2006 12:58 AM
Datagrid newrow column color sa5webber General .NET 0 May 17th, 2004 05:47 AM
One for the gurus - grid row color changing badgolfer VS.NET 2002/2003 1 February 20th, 2004 12:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.