Quote:
Originally Posted by audiofeel
Greetings!
for today, the most buggy will be 1-"FLabel" and 2-"FToggleCheckBox". let's start with "FLabel".
1. very sensitive to the order, that is, if you put "AutoSize" at the beginning, then something else will not be the correct result
|
set "
WordWrap = false" in "
TextSettings".
Code:
LB1.FCreate(FMXForm.Handle, 'MyShortText');
LB1.AutoSize(True);
LB1.top(NSY(100));
LB1.left(NSX(100));
LB1.TextSetting(False, txLeading, txCenter);
LB1.Text('FMXInno: This is a very long text for Testing FLabel AutoSize.');
Quote:
Originally Posted by audiofeel
"OnClick", "OnMouseDown", "does not work eitheronMouseEnter", "onMouseLeave", "onMouseUp". but there is one fat plus. for "FLabel" it is not necessary to copy OnMouseDown(@MainMouseDown) every time. this already works and the form is dragged with the mouse behind the "FLabel", although this is not spelled out.
|
set "
HitTest = True" (captures all mouse events)
Code:
LB1.FCreate(FMXForm.Handle, 'MyShortText');
LB1.AutoSize(True);
LB1.top(NSY(100));
LB1.left(NSX(100));
LB1.TextSetting(False, txLeading, txCenter);
LB1.HitTest(True);
LB1.OnClick(@LBOnClick);
LB1.OnMouseEnter(@LBMouseEnter);
LB1.OnMouseLeave(@LBMouseLeave);
//LB1.OnMouseDown(@FormMouseDown); (*Set HitTest = False*)
LB1.Text('FMXInno: This is a very long text for Testing FLabel AutoSize.');
Quote:
"For most controls, HitTest is True by default. However, this is not true for all the controls. For example, for TLabel and TPathLabel, HitTest is False by default;
these two controls do not capture the mouse-related events unless you set HitTest to True." - Embarcadero
|
Quote:
Originally Posted by audiofeel
2. I did this Shortcut[1].FCreate(Page2.Handle, NSX(40), NSY(250), NSX(32), NSY(14), {#Color}, CustomMessage(WizardLang + 'Page2Shortcut1') + '{#C1[59]}'); and got a full w.pu errors. I remove "+ ' {#C1[59]}'" and everything is fine. this only applies to two translation languages, one is fine.
|
i really want to see your example of this.
Quote:
Originally Posted by audiofeel
well, not big quibbles. "LockScreen" is triggered on "MsgForm.HandleHWND", although it is written in the script "LockScreen.AutoActivate([FMXForm.HandleHWND, MsgForm.HandleHWND, LangForm.HandleHWND, DirBrowseDlg.HandleHWND, DirBrowseDlg.HandleHWND2, WizardForm.Handle]);"
|
yes. "MsgForm.HandleHWND" returns the wrong handle, i don't know why.
but there's another way.
Code:
procedure ConfirmExitMsg(Sender: TObject);
begin
LockScreen.AutoActivateEnabled(False);
MsgForm.Show;
end;
// ...
procedure ExitNoBtnOnClick(Sender: TObject);
begin
MsgForm.Close;
LockScreen.AutoActivateEnabled(True);
end;