You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Rolf
As promised I have a new trait class for you (see attachments).
It's a numeric based column trait, capable of handling percision based numbers,
which I hacked together from the slightly modified 'Numeric Edit Control' code
project (http://www.codeproject.com/KB/edit/NumEditCtl.aspx).
// Interger Example: NNNN
CGridColumnTraitNumericEdit* numericCol = new CGridColumnTraitNumericEdit();
numericCol->SetLimitText(4);
numericCol->SetAllowNegativeValues(false);
numericCol->SetDigitsAfterDecimal(0);
m_list_ctrl.InsertColumnTrait(idx, "Interger Example", LVCFMT_LEFT, 100, idx,
numericCol);
// Double Example: NNNN.NN
CGridColumnTraitNumericEdit* numericCol = new CGridColumnTraitNumericEdit();
numericCol->SetLimitText(6);
numericCol->SetAllowNegativeValues(false);
numericCol->SetDigitsBeforeDecimal(4);
numericCol->SetDigitsAfterDecimal(2);
m_list_ctrl.InsertColumnTrait(idx, "Double Example", LVCFMT_LEFT, 100, idx,
numericCol);
Feel free to tidy it up refine it a little more, like I said it was hacked
together, lol
Thanks for all your help thus far :)
Darren
Original issue reported on code.google.com by [email protected] on 8 Dec 2011 at 2:38
Original issue reported on code.google.com by
[email protected]
on 8 Dec 2011 at 2:38Attachments:
The text was updated successfully, but these errors were encountered: