Recent

Author Topic: Alternative for TMemo  (Read 3460 times)

madref

  • Hero Member
  • *****
  • Posts: 864
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Alternative for TMemo
« on: July 28, 2021, 10:27:20 am »
Maybe a silly question.
But is there a replacement component for TMemo?
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus Trunc.git [2.3.0 Rev. 65550] / FPC Trunc.git [3.3.1]
Mac OS X Big Sur

Bart

  • Hero Member
  • *****
  • Posts: 4476
    • Bart en Mariska's Webstek
Re: Alternative for TMemo
« Reply #1 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

madref

  • Hero Member
  • *****
  • Posts: 864
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Alternative for TMemo
« Reply #2 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.
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus Trunc.git [2.3.0 Rev. 65550] / FPC Trunc.git [3.3.1]
Mac OS X Big Sur

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Alternative for TMemo
« Reply #3 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?
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

madref

  • Hero Member
  • *****
  • Posts: 864
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Alternative for TMemo
« Reply #4 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
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus Trunc.git [2.3.0 Rev. 65550] / FPC Trunc.git [3.3.1]
Mac OS X Big Sur

madref

  • Hero Member
  • *****
  • Posts: 864
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Alternative for TMemo
« Reply #5 on: July 28, 2021, 01:46:31 pm »
Attachment 2


Could not upload them in same post

You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus Trunc.git [2.3.0 Rev. 65550] / FPC Trunc.git [3.3.1]
Mac OS X Big Sur

dseligo

  • Sr. Member
  • ****
  • Posts: 361
Re: Alternative for TMemo
« Reply #6 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.

madref

  • Hero Member
  • *****
  • Posts: 864
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Alternative for TMemo
« Reply #7 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
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus Trunc.git [2.3.0 Rev. 65550] / FPC Trunc.git [3.3.1]
Mac OS X Big Sur

madref

  • Hero Member
  • *****
  • Posts: 864
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Alternative for TMemo
« Reply #8 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?
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus Trunc.git [2.3.0 Rev. 65550] / FPC Trunc.git [3.3.1]
Mac OS X Big Sur

 

TinyPortal © 2005-2018