websmith wrote:
allo,

i'm using CLX and am surprised that there was no memo.setTextBuf and the memo.Perform methods. any idea.

The CLX components are wrappers around the Qt class/component library which implements a very different architecture than you may be used to and the mapping between CLX and the VCL is not 100% perfect.

In particular, unlike the VCL, MFC, OWL and other Windows libraries they do not represent a more or less thin layer of abstraction over the Windows standard controls and messaging system.

If anything Qt is an abstraction of the KDE Widget set on Linux and the "signal/handler" architecture that is the closest thing to the universal Windows message loop that Linux has.

This Qt model has been tweaked and ported to abstract it to other GUI architectures, mainly the Mac UI and Windows; and now CLX is an Object Pascal wrapper around Qt for Kylix and Delphi (Got all that?)

So, the resulting model for a multiline edit control (i.e. a Memo) reflects the abstracted KDE/Qt heritage rather than the Windows one. A CLX memo, then, can't (or shouldn't) assume there's a Windows Control underneath.

Now, arguably, if there's a way to set the Text property, there has to be some way to pass a string to the control; and you could probably kluge a .SetTextBuf for yourself if it really bothers you not to have it.

The issue in creating the CLX Memo probably was that it didn't buy you anything performance-wise over just setting the .Text property; unlike using the VCL .SetTextBuff does.

.Perform is a different kettle of worms: in TWinControl, calling Perform actually calls the routine that is used to process Windows messages. Conceptually a CLX control isn't a Windows control, so (again conceptually) there are no Windows messages to process.

Now, when running on Windows, of course in the depths of Qt there's undoubtedly a Windows multiline EDIT control SOMEWHERE underneath the CLX Memo.

And there's probably some fancy footwork you could to do get at it and manipulate it as a Windows control and send Windows messages to it, but that would sort of defeat the purpose of creating a (theoretically cross-platform) CLX application (all that code would break if you ported it to Linux).

If you want that kind of flexibility or control, why not just make a VCL app?

Stephen Posey
[EMAIL PROTECTED]

_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://www.elists.org/mailman/listinfo/delphi

Reply via email to