Vincent Snijders ha scritto:
Graeme Geldenhuys schreef:
On 29/01/2008, Vincent Snijders <[EMAIL PROTECTED]> wrote:
You don't need ifdefs. You need to fix the differences.

Fix the gtk1 interface to scroll the memo.
Fix the gtk1 interface to remove the scrollbars, when the memo is cleared Fix gtk1 and gtk2 interface to disable childforms, if the main form is enabled.

That is why there different widgetset backends too, not just to create different
widgets, but also to make them behave consistent.

But how do you know if that's not maybe the native behaviour of the
underlying widgetset? I think this is what Giuliano was trying to say
or assumed.


Don't assume, research.

Not convinced,

GTK1 implementation of TMemo InsertText:

    if NewTextLength - CutLength > 0 then begin
      gtk_editable_insert_text(PGtkEditable(widget), char,
                               NewTextLength - CutLength, Position);
    end;

    g_signal_stop_emission_by_name(PGtkObject(widget), 'insert_text');

GTK2 implementation of Tmemo InsertText:

    if NewTextLength - CutLength > 0 then begin
gtk_text_buffer_insert(TextBuffer, StartIter, TheText, NewTextLength - CutLength);
    end;

    g_signal_stop_emission_by_name(PGtkObject(Textbuffer), 'insert-text');

GTK2 scrolls in order to show the text just inserted, GTK1 doesn't.

Convinced now?

Giuliano


--
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

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

Reply via email to