Difference between revisions of "Win32/64 Interface"

From Lazarus wiki
Jump to navigationJump to search
Line 7: Line 7:
  
 
Mattias: I will implement this eventually, but my winapi interface knowledge is little and I have a lot of other lazarus tasks already, so I can't say when I implement it.
 
Mattias: I will implement this eventually, but my winapi interface knowledge is little and I have a lot of other lazarus tasks already, so I can't say when I implement it.
 +
 +
==Child controls disabling problem==
 +
 +
Also take a look at [[LCL Internals#Control enabling/disabling]]
 +
 +
One problem with control disabling is that nothing is done to guarantee that the child controls will also be disabled. This creates an inconsistency between widgetsets that automatically disable child controls (gtk) and those that don't (windows). On Windows if one has a groupbox with a combobox inside, and disables the groupbox, you can no longer use the combobox, but it doesn't look greyed. Possible solutions are:
 +
 +
1 - Do a loop which disables/enables the child controls on LCL
 +
2 - Add a new method somewhere on the widgetset so that widgetsets that need to manually disable child controls can do it
 +
 +
The place to fix it is most probably:
 +
 +
<pre>
 +
procedure TWinControl.CMEnabledChanged(var Message: TLMessage);
 +
</pre>

Revision as of 11:03, 31 January 2008

Scrolling

The scrolling is currently done by moving the childs instead of the client area as the LCL expects. For example in some cases it looks as if the childs are scrolled in reverse direction. The truth is that the scrolling is pretty much broken. Scrolling the childs is incompatible to the other widgetsets and has a drawback: Moving one child after the other generates several move messages. The LCL receives the messages and each time it has to react. For example it has to realign all anchored childs. You can control this trouble for one widgetset but it will never work well for all. So this works for Delphi VCL, but not for the LCL. Therefore another approach must be implemented:

Solution

Between child windows and parent window a 'client area' window will be inserted. The child windows are put onto the 'client area' window and when the childs are scrolled the 'client area' window is moved instead. This is already done by the other widgetsets.

Mattias: I will implement this eventually, but my winapi interface knowledge is little and I have a lot of other lazarus tasks already, so I can't say when I implement it.

Child controls disabling problem

Also take a look at LCL Internals#Control enabling/disabling

One problem with control disabling is that nothing is done to guarantee that the child controls will also be disabled. This creates an inconsistency between widgetsets that automatically disable child controls (gtk) and those that don't (windows). On Windows if one has a groupbox with a combobox inside, and disables the groupbox, you can no longer use the combobox, but it doesn't look greyed. Possible solutions are:

1 - Do a loop which disables/enables the child controls on LCL 2 - Add a new method somewhere on the widgetset so that widgetsets that need to manually disable child controls can do it

The place to fix it is most probably:

procedure TWinControl.CMEnabledChanged(var Message: TLMessage);