[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

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


         
0
BaTy_GiRl
Asked:
BaTy_GiRl
1 Solution
 
Wim ten BrinkCommented:
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
 
DragonSlayerCommented:
or an alternative is to use a TListView in report mode, and set the CheckBoxes property to True
0
 
DarkCore_Commented:
If you look for some components, you have Developer express DBGrid which draws checkboxes on cells ( and more ).

edu
0
 
BaTy_GiRlAuthor Commented:
thanls to all....

good luck =)-
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now