[Lazarus] Is there a TSpinButton component in Lazarus?

Bo Berglund bo.berglund at gmail.com
Mon Sep 21 20:59:04 CEST 2020


On Mon, 21 Sep 2020 08:20:33 +0200, Ondrej Pokorny via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>On 21.09.2020 00:49, Bo Berglund via lazarus wrote:
>> When I thought that I was close to getting through all of the problems
>> porting an application from Delphi (I think D7-D2007) to FPC/Lazarus I
>> ran across TSpinButton, which is located on a form where config items
>> are set up.
>> Since Lazarus is unable to load this form I cannot see what it does or
>> how it looks like.
>
>Delphi has TUpDown and TSpinButton. If I am correct they are very 
>similar (TUpDown being the WIndows native and TSpinButton being a custom 
>control).
>
>> Is there any such component avilable for Lazarus?
>
>The LCL has only the TUpDown.
>
>
>> And is there a way in Lazarus to search for a component instead of
>> flipping through all of the palette tabs looking for a candidate
>> image?
>
>Main Menu -> View -> Components.
>

Thanks this was useful!

I could change the code to use TUpDown instead and the form looks OK
now in Lazarus. Had to hand edit outside of lazarus...


But now I have very strange errors when I am using Quick Compile to
check syntax:

FormTaskProperties.pas(38,14) Error: Identifier not found
"TDateTimePicker"
FormTaskProperties.pas(38,29) Error: Error in type definition
FormTaskProperties.pas(38,5) Error: Symbol cannot be published, can be
only a class
FormTaskProperties.pas(39,14) Error: Identifier not found
"TDateTimePicker"
FormTaskProperties.pas(39,29) Error: Error in type definition
FormTaskProperties.pas(39,5) Error: Symbol cannot be published, can be
only a class

it happens on these lines (38 and 39) in the source at the top where
all form components are listed:

    dtpDate: TDateTimePicker;
    dtpTime: TDateTimePicker;

If I switch to form view the two controls are perfectly visible, which
I don't think would happen if the control is unknown.

And the component itself *is* available on the Lazarus component
palette (Common Controls).

What is causing this really strange error???
And what can I do about it?
Doing a build instead of Quick Compile does not help, same errors...


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list