Solved

TString with check boxes

Posted on 2004-08-02
4
203 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
Comment Utility
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
Comment Utility
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_
Comment Utility
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
Comment Utility
thanls to all....

good luck =)-
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now