MagicFoundation / Alcinoe

Alcinoe Component Library For Delphi. Full opengl video player, WebRTC delphi wrapper, native ios/android TEdit, Improuved firemonkey controls, Firebase cloud messaging, Android/ios facebook sdk login, Json/Bson Parser, ImageMagick wrapper, MongoDb client And much more
Apache License 2.0
998 stars 220 forks source link

[BUG] TAlEdit don't work with Tform.BorderIcons.biMaximize = False #349

Closed maurobotta closed 1 month ago

maurobotta commented 1 month ago

Hi, i have a FMX application con any forms, i'm trying converting frm FMX To new Skia / Alicinoe ( TALEdit ),

i have found a bug with TAlEdit / TAlMemo.. don't work if form container have set to FALSE the property : Tform.BorderIcons.biMaximize

No runtime error, only a Edit empty.

Mauro

Zeus64 commented 1 month ago

Hmm, it's only on Window right ? do you have some knowledge with window API? i guess the problem is here :

  TALWinEditView = class(TALWinNativeView)
  private
    FFontHandle: HFONT;
    FBackgroundBrush: HBRUSH;
    FEditControl: TALWinEditControl;
    {$IF not defined(ALDPK)}
    procedure UpdateFontHandle;
    procedure UpdateBackgroundBrush;
    {$ENDIF}
    procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN;
    procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
    procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP;
    procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE;
    procedure WMChar(var Message: TWMChar); message WM_CHAR;
    procedure WMTextColor(var Message: WinApi.Messages.TMessage); message CN_CTLCOLOREDIT;
    procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
  protected
    procedure CreateParams(var Params: TCreateParams); override;
  public
    constructor Create(const AControl: TControl); override;
    destructor Destroy; override;
    property EditControl: TALWinEditControl read FEditControl;
  end;

I will try to look at it a little later but if in the meantime you can also take a look on it, thanks a lot :)

maurobotta commented 1 month ago

OS Sorry..

Target OS Compile: "Android 64" Device: Samsung S24 U Android 14 Delphi 12.2

Zeus64 commented 1 month ago

you mean on android, when Tform.BorderIcons.biMaximize=false then the TALEdit do not work right ?

maurobotta commented 1 month ago

you mean on android, when Tform.BorderIcons.biMaximize=false then the TALEdit do not work right ?

YES

Zeus64 commented 1 month ago

Can i ask you, what the purpose to have Tform.BorderIcons.biMaximize=false in android ?

maurobotta commented 1 month ago

Can i ask you, what the purpose to have Tform.BorderIcons.biMaximize=false in android ?

The app is multy OS,

the problem is TAlEdit fail ( ignore biMaximize on android )

Zeus64 commented 1 month ago

Corrected in the last commit, please update the repository. Thanks for the report !