Re: [Lazarus] How to convert Delphi program with TRichEdit?

2021-12-08 Thread Bo Berglund via lazarus
On Wed, 8 Dec 2021 23:28:23 +0200, "R.Smith via lazarus"
 wrote:

>> So How can I:
>>
>> 1) Replace the main form of a Lazarus program with another form?
>> or
>> 2) Create a new program in Lazarus where I can specify an existing form as 
>> the
>> main program form.
>>
>> Either of these will work, but I don't really know how to do any of them.
>
>This is quick to do -
>via the GUI:
>
>In the Project Options, simply go to "Forms" and make sure the topmost 
>one is the one you want to load as your main form.

Wel, my form is not shown here either as active or available.
I added the unit via Project Inspector using the Add button...


>via Code:
>
>Open the program file (Project --> View Source) and make sure in the 
>code section the very first "Application.CreateForm(...)" that appears 
>is the one for your desired main form.

In the source I had to:
- Add the form unit to the uses clause and remove Unit1
- Change the Application.CreateForm call to use the specific form
- Erase Form1 from the lpr file
- Remove Unit1 in Project Inspector.

>Basically TApplication regards the first form it opens as the "main" 
>form, which simply means that that form is shown automatically first 
>(unless specified not to) and that it will exit when that form closes 
>(and a few more small things).

OK, so now I have to solve the dependencies that popped up regarding used units
in the now main form...


-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to convert Delphi program with TRichEdit?

2021-12-08 Thread Dmitry Boyarintsev via lazarus
On Wednesday, December 8, 2021, Bo Berglund via lazarus <
lazarus@lists.lazarus-ide.org> wrote:
>
> Is there some non-standard package I could install (from  OLPM or similar)
> in
> order to get it working again?
>
 you might want to try TRichMemo

it provides some sort of compatibility with TRichEdit
https://wiki.freepascal.org/RichMemo#TRichEditForMemo

thanks,
Dmitry
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to convert Delphi program with TRichEdit?

2021-12-08 Thread R.Smith via lazarus

On 2021/12/08 22:44, Bo Berglund via lazarus wrote:

I need to port an old Delphi program to FPC/Lazarus and it contains two
TRichEdit components.

When I try to open the form in Lazarus 2.0.12 on Windows 10 with Fpc 3.2.0 I get
an error because the TRichEdit component does not exist

Is there some non-standard package I could install (from  OLPM or similar) in
order to get it working again?


Not really. The problem is TRichEdit was just a wrapper for the MS 
Windows RichEdit component, which was born before the days of HTML 
componenets, so far inferior to anything new. It does not exist anywhere 
else in the world and so not useful on a cross-platform development 
system. Not sure if anybody reverse-engineered the RichEdit 
functionality, but if Google doesn't know then I am relatively sure 
there isn't.





I have a new laptop now and I have no new Delphi version installed (except for
Delphi 7 with the no-nonsense license). I am only using Fpc + Lazarus nowadays.

Another question while I am here:
-

The form I have problems with is a special calculation sheet in one single form,
which is part of the source program.
But I only need to port this form into the new Lazarus program so I tried to
create a new program from scratch and intended to replace the default form as
the main form.
But I don't know really how to do this...

So How can I:

1) Replace the main form of a Lazarus program with another form?
or
2) Create a new program in Lazarus where I can specify an existing form as the
main program form.

Either of these will work, but I don't really know how to do any of them.


This is quick to do -
via the GUI:

In the Project Options, simply go to "Forms" and make sure the topmost 
one is the one you want to load as your main form.


via Code:

Open the program file (Project --> View Source) and make sure in the 
code section the very first "Application.CreateForm(...)" that appears 
is the one for your desired main form.


Basically TApplication regards the first form it opens as the "main" 
form, which simply means that that form is shown automatically first 
(unless specified not to) and that it will exit when that form closes 
(and a few more small things).



--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] How to convert Delphi program with TRichEdit?

2021-12-08 Thread Bo Berglund via lazarus
I need to port an old Delphi program to FPC/Lazarus and it contains two
TRichEdit components.

When I try to open the form in Lazarus 2.0.12 on Windows 10 with Fpc 3.2.0 I get
an error because the TRichEdit component does not exist

Is there some non-standard package I could install (from  OLPM or similar) in
order to get it working again?

I have a new laptop now and I have no new Delphi version installed (except for
Delphi 7 with the no-nonsense license). I am only using Fpc + Lazarus nowadays.

Another question while I am here:
-

The form I have problems with is a special calculation sheet in one single form,
which is part of the source program.
But I only need to port this form into the new Lazarus program so I tried to
create a new program from scratch and intended to replace the default form as
the main form.
But I don't know really how to do this...

So How can I:

1) Replace the main form of a Lazarus program with another form?
or
2) Create a new program in Lazarus where I can specify an existing form as the
main program form.

Either of these will work, but I don't really know how to do any of them.


-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TComboBox using csSimple, but with a dropdown list

2021-12-08 Thread Marcos Douglas B. Santos via lazarus
Hi,

Is it possible to have a TComboBox, Style=csSimple, but with a dropdown
list?
I would like to have a combo with no arrow, as csSimple style, but with the
dropdown (auto) list. Even though TComboBox has the option to hide the
arrow, the dropdown list doesn't work.

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus