[lazarus] lazarus Patch

Andrew Johnson aj_genius at hotmail.com
Sat Sep 28 23:16:14 EDT 2002


Here is a minor patch partially fixing the bugs Tony found,

Patch includes:

-fixes Problems with hiding modal forms
-temporarily fixes TCustomForm.BorderStyle in bsNone
-temporarily fixes problems with improper tabbing in TSynEdit



It should be noted that the Border Style fix is temporary because this 
apears to be a problem with GDK/GTK not LCL code. In GTK 2.0 this problem 
should no longer be an issue because we can simply turn off the border, 
however this is not available in GTK 1.X, so to do this we have to hide the 
gdk form after showing, reset the border flags, and reshow. This will mean 
borderless forms(for instance the Splash form) and non-bsSizeable forms may 
"Flash" upon showing, at the moment I know of no way to fix this in GTK 1, 
because I know of no way to realize the gdk-window, without showing the 
gtk-wiget.

Also on tabbing several things should be noted -

1.) There apears to be a bug in FPC, which causes it to bomb out
    when overriding a Protected property with a default value,
    so when creating controls, all controls natively default to
    TabStop = False.

2.) As a work around to this bug, when in the form designer it
    automatically sets tabstop to true on ALL wincontrols.

3.) Currently the new Tab Code has been redesigned to be called
    from within the GTK interface, however the problem with
    TSynEdit turns out to be that the Notebook components is
    receiving all key events before the editor, so the tab code
    is called BEFORE SynEdit can intercept it and handle it
    properly, so until a solution to this is resolved this code
    has been disabled. I have wasted a lot of time on this one,
    so unless I can figure out a better way to do this, or
    figure out how to fix the code, I will not be doing anymore
    to resolve this. AKA The tab code will continue work the way
    it did BEFORE my changes, that is, the taborder cannot be
    changed and it will always be the create/show order of the
    components.

4.) Apart from the prior problems(which granted ARE show
    stopers), I think the only thing left to be done to make
    tabbing work most of the time is to rearrange the Control
    order on changing of the tab order, so that in Lazarus
    saving to stream all components get saved in tab order. This
    will ensure that the initial taborder value is the one which
    was set in the editor. So if someone else want to fix the
    first 3 problems, especially #3, tabbing and tab order
    should work most of the time.

Andrew

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00005.bin
Type: application/octet-stream
Size: 4202 bytes
Desc: "lazarus.patch.gz"
Url : http://localhost/pipermail/lazarus/attachments/20020928/62aaf1e3/bin00005.bin


More information about the Lazarus mailing list