Ok, I've just noticed that in VCL the Canvas is only provided by
TCustomForm and not TScrollingWinControl...

Don't know. Flavio is right, that at the moment only
TScrollingWinControl uses TControlScrollBar and so the code *could* be
moved to save a 'with'. Is there another gain?

Although I generally hate the 'with' construction that was certainly
not my objective ;-)
My reasoning was that the control knows the logic of its scrollbars,
not the other way around.
I changed it so that TSynEdit (and e.g. the grids) could inherit from
TScrollingWinControl and then avoid API specific/like code in tem.

Again, I can't see any use for overriding/inheriting from
TControlScrollbar... One would have to inherit the control from
TScrollingWinControl and use quite some hacks to be able to change the
instance of the scrollbars to new one...


There are some ToDos in the patch:

//todo: why doesn't it simply use ClientWidth/Height?
// page
HorzScrollbar.FPage := Min(ClientWidth -1,High(HorzScrollbar.FPage));
VertScrollbar.FPage := Min(ClientHeight-1,High(VertScrollbar.FPage));

Answer: HorzScrollbar.FPage is not integer.

Oops. Dumb me :-$


//todo: rename to IsScrollbarsStored
Function StoreScrollBars : Boolean;

Both are good names. The Isxxx is more Delphi like. Just rename or
keep it. It is a private function anyway. Don't add such
todos.

Ok, thanks for your comments and time :-)
Just to get it straight, do you mean just the last kind comment or any
TODOs in patches?...
(and being a little picky, a method called 'StoreXXX' - i.e.
imperative verbs - seems to be storing something, not asking whether
it is/should be stored...)

Cheers,
Flávio

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to