Solved

TString with check boxes

Posted on 2004-08-02
4
206 Views
Last Modified: 2010-04-05
hi there!!!


Anybody know how can i add a check box into a cell of a TString Grid, i mean i want to add at the first column of my grid
checkboxes

Thanks


         
0
Comment
Question by:BaTy_GiRl
4 Comments
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 11695235
You need to draw them yourself. Perhaps there are components that provide what you're looking for. I also know there's some kind of Windows API function that can be used to draw a checked or unchecked checkbox on your canvas. This is the function DrawFrameControl() for which you can find help in the helpfiles.

Basically, use:
DrawFrameControl(Canvas.Handle, Rect, DFC_BUTTON, DFCS_BUTTONCHECK);
DrawFrameControl(Canvas.Handle, Rect, DFC_BUTTON, DFCS_BUTTONCHECK or DFCS_CHECKED);
for either an unchecked or checked checkbox on your grid.

The StringGrid itself offers enough functionality to do this custom drawing, btw. No need for a new component.
0
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 50 total points
ID: 11696110
or an alternative is to use a TListView in report mode, and set the CheckBoxes property to True
0
 
LVL 2

Expert Comment

by:DarkCore_
ID: 11712842
If you look for some components, you have Developer express DBGrid which draws checkboxes on cells ( and more ).

edu
0
 

Author Comment

by:BaTy_GiRl
ID: 11810079
thanls to all....

good luck =)-
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question