|
|
Home » U++ Library support » Slider&ProgressIndicator » ProgressIndicator in ArrayCtrl
|
|
|
|
|
|
|
|
Re: ProgressIndicator in ArrayCtrl [message #12494 is a reply to message #12487] |
Mon, 05 November 2007 22:29   |
|
I think it's unnecessary. One can turn on icon displaying to achieve better readability. The answer to question what is better colors or icons is of course very subjective. IMO too many colors will make theide to look unprofessional.
|
|
|
|
Re: ProgressIndicator in ArrayCtrl [message #12501 is a reply to message #12496] |
Tue, 06 November 2007 11:39   |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
Good bug!
When drawing percentages the progress bar falls back to none-chameleon drawing style and the function GetMsz() used for returning the inner control size (minus margins) returns an incorrect value because it still uses ChMargin.
My quick fix:
Size ProgressIndicator::GetMsz()
{
Size sz = GetSize();
if (GUI_GlobalStyle() >= GUISTYLE_XP && !percent) {
Rect mg = ChMargins(style->hlook);
sz.cx -= mg.left + mg.right;
mg = ChMargins(style->vlook);
sz.cy -= mg.top + mg.bottom;
}
else {
sz.cx -= 4;
sz.cy -= 4;
}
return sz;
}
James
[Updated on: Tue, 06 November 2007 11:40] Report message to a moderator
|
|
|
|
|
|
|
Re: ProgressIndicator in ArrayCtrl [message #12530 is a reply to message #12359] |
Wed, 07 November 2007 16:46   |
mr_ped
Messages: 790 Registered: November 2005 Location: Czech Republic - Praha
|
Contributor |

|
|
I'm not sure what did cause the error and what kind of error you are talking about, but doing "delete progress" as long as the list control has the pointer too may be big problem. Unless the destructor of ProgressIndicator will notify the parent control about it's deletion, in such case the code is ok, but IMHO *looks* bad anyway.
Try to do "list.Set(i, CPROG, "OK");" ahead of delete, that will be more logical and more easy to read for my mind.
(and check if the second "Set" will destroy the reference of list to progress, or you need some Unset .. sorry, I can't give you exact help as I didn't need yet the UPP GUI so I'm not sure how those classes work and about their API)
If the problem persist, try to post here what the error is or wait for someone else to give you another hint.
|
|
|
|
Goto Forum:
Current Time: Tue Feb 19 19:55:39 CET 2019
Total time taken to generate the page: 0.00967 seconds
|
|
|