Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

TString with check boxes

Posted on 2004-08-02
4
205 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 149
code issue 8 153
Mobile Keyboard covers the display of the TMemo 3 95
firemonkey keyboard covers the controls 1 37
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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…

809 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