Forum > LCL

StringGrid and cbs.....

(1/3) > >>

asdf:
1. Could StringGrid shows cbsButton, cbsEllipsis and cbsPickList at all times like cbsCheckBoxColumn ? Not only when double click to edit cell data.

2. How can we protect the cells with cbsPickList by using only values in PickList?
    I noticed that I could edit the value by using the keyboard.

tk:
In KGrid:
1. You have to paint it in OnDrawCell.
2. You can assign your own combo box with csDropDownList style as inplace editor.

asdf:
By upgrading to v0.9.29, now I've got 1. already  :D .
But how can I add a tiny picture with text on the buttons  :-\ ?

Using cbs...., Grid must be +[goediting].
For cbsPickList, how can I setup the cell to accept "only" a value from PickList?

asdf:
How can we put a tiny picture with text on the buttons  :-\ ?

Using cbs...., Grid must be +[goediting].
For cbsPickList, how can I setup the cell to accept "only" a value from PickList?

jesusr:
You can use grid event OnDrawCell to draw anything over the button. About the picklist question, see this example:  http://wiki.lazarus.freepascal.org/Grids_Reference_Page#Example:_Working_with_Picklist.2C_How_to_make_it_read_only_and_How_to_fill_it_at_run_time.

Navigation

[0] Message Index

[#] Next page

Go to full version