Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

FMXTabbedBrowser caret disappears in TEdit input fields after creating second TabItem

Post Reply
igor666
Posts: 73
Joined: Fri Feb 08, 2019 1:25 pm

FMXTabbedBrowser caret disappears in TEdit input fields after creating second TabItem

Post by igor666 »

Hi, I noticed in FMX Tabbed Browser after creating the second tab the caret disappears in all TEdit input fields. Experimentally I found out that it disappears here in FMXWindowParent.Reparent(ParentForm.Handle), or more precisely in Reparent itself after processing the line

Code: Select all

SetWindowLong(TempChildHandle, GWL_STYLE, WS_CHILD);
I did a couple more experiments and noticed that if the WS_CHILDWINDOW parameter is replaced with WS_POPUPWINDOW or WS_POPUPWINDOW + WS_CHILDWINDOW then the carriage does not disappear and the program seems to work normally, I haven’t noticed any deviations yet :).
Is it normal to change this setting in Reparent?
igor666
Posts: 73
Joined: Fri Feb 08, 2019 1:25 pm

Re: FMXTabbedBrowser caret disappears in TEdit input fields after creating second TabItem

Post by igor666 »

I noticed that this message started appearing when compiling a project:
[dcc32 Warning] uBrowserFrame.pas(290): W1012 Constant expression violates subrange bounds
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: FMXTabbedBrowser caret disappears in TEdit input fields after creating second TabItem

Post by salvadordf »

Hi,

Thanks for the fix! :D

I just added a new optional parameter to TFMXWindowParent.Reparent with the value you gave as default.
igor666
Posts: 73
Joined: Fri Feb 08, 2019 1:25 pm

Re: FMXTabbedBrowser caret disappears in TEdit input fields after creating second TabItem

Post by igor666 »

Thank you! :D
igor666
Posts: 73
Joined: Fri Feb 08, 2019 1:25 pm

Re: FMXTabbedBrowser caret disappears in TEdit input fields after creating second TabItem

Post by igor666 »

I noticed one unpleasant feature after adding WS_POPUPWINDOW, now the program after it goes to the background, i.e. if we switch to other programs, and then want to open ours, then it opens on the second or third click, and before that there is flickering, it seems to be trying to go to the foreground and then itself goes to the background :(
Post Reply