Page 8 of 25
Posted: Wed Oct 11, 2006 10:24 am
by srod
Ah yes, this will be because Windows is ignoring the fact that egrid has taken over the painting of all cell contents and I do not use the default margins in order to align the text with the edit control used.
Believe me, this alignment (allowing for left, centered and right justified text) has taken hours and hours to get right and means that a double-click resize will be out by a couple of pixels.
egrid version 2 did not suffer from this problem because in that version, the selection border was drawn outside of the selected cell and so did not have to be accounted for.
Placing the cell border inside the selected cell (where it rightly belongs

) has necessitated a couple of minor sacrifices to be made.
I think you'll agree that it is only a minor deal and one not worth the effort of bothering with.
(Now agree damn you!

)
Posted: Wed Oct 11, 2006 10:46 am
by srod
**Bugs fixed - 11 October 2006.
- Double-click column resize did not work when there was no CellCallback function defined.
- Multiline text did not display the ellipsis when a single line could not be broken.
Next upload will include the fixes.
Posted: Wed Oct 11, 2006 11:00 am
by mskuma
srod wrote:I think you'll agree that it is only a minor deal and one not worth the effort of bothering with.
I guess it's not a huge deal (for me as the developer), but I can imagine one day some fickle user will come up to me and ask me why.
Posted: Wed Oct 11, 2006 11:06 am
by srod
mskuma wrote:srod wrote:I think you'll agree that it is only a minor deal and one not worth the effort of bothering with.
I guess it's not a huge deal (for me as the developer), but I can imagine one day some fickle user will come up to me and ask me why.
Tell him his monitor is faulty!
Either that or bash him over the head with an iron bar. It works for me!

Posted: Wed Oct 11, 2006 11:16 am
by mskuma
srod wrote:bash him over the head with an iron bar. It works for me!

Thereafter, the complaints will certainly subside.
Posted: Wed Oct 11, 2006 11:25 am
by srod
Yep, I've always said that it's worth investing time and effort in building customer relations.
It pays dividends in the long run!

Posted: Wed Oct 11, 2006 11:50 am
by mskuma
srod wrote:Yep, I've always said that it's worth investing time and effort in building customer relations
Most of my current users are mates or close colleagues - we have a mutual arrangement where they can bash me when I screw up, or I can bash them when they introduce a new feature request. But for others, I need to put away the bat..
Back to the matter - if it's out (consistently) by a couple of pixels, is it not possible to simply compensate by adding a value to the result returned by the width calculator? Or I guess the amount is likely to compensate dependent upon the font used.
Posted: Wed Oct 11, 2006 12:10 pm
by srod
The calculations involved in setting the margins run roughly along the following lines:
- Is xp themes enabled? If so are gridlines being used? If so make a whole bunch of adjustments ...
- if not xpthemes, but gridlines enabled...
- else calculate default margins
- Is the item being painted within the first column (not always column zero)? If so make certain adjustments...
- is text right justified? If so, compensate slightly...
- Is multiline text enabled? If so, adjust vertical margins to centre the text vertically.
Now the above excludes the calculations necessary to position the edit controls used to edit text based cells etc. which are just as fiddly.
This is on top of some fiddly code to ensure things are painted in the correct order - requiring some bullyboy treatment of Windows!
Having spent the best part of my formative years getting these alignment issues running smoothly, I am very reluctant to alter any part of it. Even a single pixel adjustment will throw the whole lot out and undo a lot of work.
I read with interest an article by some guy who produced a similar grid control using MFC. He spent 4 years on it and had many of the same issues - many of which came down to individual pixels etc.

Posted: Wed Oct 11, 2006 3:05 pm
by srod
**Bug fixed - 11 October 2006.
- The unicode version of the egrid library would not accept registered users password.
Next upload will include the fix.
Also, despite the rant and rave above about being unable to fix the double click column resizing issue, - I've fixed it!

Posted: Wed Oct 11, 2006 9:18 pm
by rw
Hi Stephen!
There is a glitch with the selection border.
Try your demo1 but without gridlines.
The botton line of the border is not drawn correctly.
Regards
rw
Posted: Wed Oct 11, 2006 9:21 pm
by srod
That'll be because of all the ammendments I've been making by way of requests.
I'll have a look.
Thanks for the report.
Posted: Wed Oct 11, 2006 9:25 pm
by srod
Fixed.
The problem was that in ammending the code to allow for multiline text, I'd forgotten about taking gridlines into account. More accurately, I'd not taken the fact that there may not be any gridlines into account!
I'll upload new versions tomorrow as I'm working on the help manual now. And it's slow going!
Posted: Wed Oct 11, 2006 10:36 pm
by mskuma
srod wrote:Having spent the best part of my formative years getting these alignment issues running smoothly, I am very reluctant to alter any part of it.
some guy who produced a similar grid control using MFC. He spent 4 years on it
Just what I thought.. so 7.50GBP for many years of honing.. folks, this grid is the bargain component of the decade

. Get it while it's cheap.
Seriously, it's fantastic to get this level of support and dedication, though it's a part-time endeavour. My hat off to you srod!
Posted: Wed Oct 11, 2006 11:47 pm
by Dare
mskuma wrote:srod wrote:Having spent the best part of my formative years getting these alignment issues running smoothly, I am very reluctant to alter any part of it.
some guy who produced a similar grid control using MFC. He spent 4 years on it
Just what I thought.. so 7.50GBP for many years of honing.. folks, this grid is the bargain component of the decade

. Get it while it's cheap.
Seriously, it's fantastic to get this level of support and dedication, though it's a part-time endeavour. My hat off to you srod!
Well said. Agreed.
Posted: Wed Oct 11, 2006 11:54 pm
by stubbsi
looks like this is the australian agreement post...
Agreed!!!