Link to home
Start Free TrialLog in
Avatar of BaTy_GiRl
BaTy_GiRl

asked on

TString with check boxes

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


         
Avatar of Wim ten Brink
Wim ten Brink
Flag of Netherlands image

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.
ASKER CERTIFIED SOLUTION
Avatar of DragonSlayer
DragonSlayer
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DarkCore_
DarkCore_

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

edu
Avatar of BaTy_GiRl

ASKER

thanls to all....

good luck =)-