Lazarus

Programming => LCL => Topic started by: madref on July 28, 2021, 10:27:20 am

Title: Alternative for TMemo
Post by: madref on July 28, 2021, 10:27:20 am
Maybe a silly question.
But is there a replacement component for TMemo?
Title: Re: Alternative for TMemo
Post by: Bart on July 28, 2021, 10:50:04 am
Why do you need it?
Do you need something that TMemo does not provide?
Some other reason?
Is e.g. TSynEdit usefull for you?

Bart
Title: Re: Alternative for TMemo
Post by: madref on July 28, 2021, 12:36:58 pm
I have a form which contains a 2 images, a memo and a TColorSpeedButton (from BGRA component)
I also use these buttons on a different form where they work as they should do.


Now on my form when the TMemo has control the hover-color change does not work on the button on this form.
And one way or another I can't change the focus on this form.
Title: Re: Alternative for TMemo
Post by: lucamar on July 28, 2021, 01:05:11 pm
I just made a quick test with a memo and a normal TButton and it works as it should (using OnMouseEnter/OnMouseLeave). Laz/FPC 2.0.12/3.2.0 (x86_64 Linux-gtk).

Might be a problem specific to MacOS (assuming, from your signature, that you're on a Mac) or a queer interaction with BGRA controls? Or something in your code?
Title: Re: Alternative for TMemo
Post by: madref on July 28, 2021, 01:45:59 pm
Yes I am using a Mac


I have included a small example program with the actual forms.


The only buttons that work on the ribbon are [Referee Database Exit] [Referee Database Information]


When you press the [Exit]-button on the ribbon en you move your mouse over [No] the button changes color. When you press it it changes to another color.


When I Try to do that in the Information Form it does NOT WORK...


Any suggestions
Title: Re: Alternative for TMemo
Post by: madref on July 28, 2021, 01:46:31 pm
Attachment 2


Could not upload them in same post

Title: Re: Alternative for TMemo
Post by: dseligo on July 28, 2021, 06:29:05 pm
I tried it and it changes color (on hover and on click) in Windows 10.

I couldn't run your example directly, so I created new project and added your files in it.
Title: Re: Alternative for TMemo
Post by: madref on July 29, 2021, 08:05:43 pm
I know that the code is good....
But still something is wrong and I don't know what
Title: Re: Alternative for TMemo
Post by: madref on July 30, 2021, 10:22:01 am
I have noticed a strange behavior.


When I completely scroll down in my TMemo field and then go over my button it works like a charm.


So what is the problem?
TinyPortal © 2005-2018