Paul Ishenin wrote:
Giuliano Colla wrote:
From a quick look to documentation, RecreateWnd is just a dangerous hack/workaround to overcome some Windows bugs/inadequacies.

In Windows it's impossible to change some properties of a window, such as:
   *  Changing the border style.
* Changing the CharCase, HideSelection or OEMConvert property of an edit control.
   * Changing the Alignment or ScrollBars property of a memo control.
   * Changing the Sorted or Style property of a listbox control.
   * Changing the Sorted or Style property of a listbox control.
   * Changing the Alignment property of a listbox control.
   * Changing the Ctl3D appearance of a checkbox control.

and the only thing that can be done is to destroy it, and then recreate it with new properties. It's just one of the 65000-plus known bugs of Windows. This is not only unneeded, but not even thought of in other OS's. Only in Redmond such a thing can be considered "normal".

Dont make quick decisions :) Some qt widgets also lack from inability to change few properties after their creation. For example QRubberBand cannot change its shape after creating. Some gtk properties also cannot be set after realizing of widget. For example you cannot ask gtk widget to create/remove gdk window after widget realizing. I expect carbon can have own examples. So in 2% of cases RecreateWnd is needed,

That is exactly why I removed recreatewind form twincontrol. Most (if not all) widgetsets needs a recreate for the one or the other property (you cannot add columns to a listview in gtk for instance). However this recreating is not always for the same property. So recreate will work, but in most widgetsets it is unneeded.

but indeed its add headache.

For the LCL itself it doesn't since all logic to create a handle is already present.


Marc

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

Reply via email to