Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2020-09

Is there a TSpinButton component in Lazarus?

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

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.

Is there any such component avilable for Lazarus?
According to Google there seems to be a "TSpinButton" in Delphi, but I cannot find it in Delphi7 at least (but I have also lost TSpinEdit from Delphi7...).
What does TSpinButton do and is there a Lazarus companion?

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?

Bo Berglund Developer in Sweden

Reply by email

Ondrej Pokorny
to Bo Berglund
Bo Berglund wrote 6 lines
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.

Show quoted text 8 lines
According to Google there seems to be a "TSpinButton" in Delphi, but I cannot find it in Delphi7 at least (but I have also lost TSpinEdit from Delphi7...). What does TSpinButton do and is there a Lazarus companion? 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.

Ondrej

Reply by email

Bo Berglund
to Ondrej Pokorny
Ondrej Pokorny wrote 23 lines
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

Reply by email

AlexeyT
to Bo Berglund

Maybe a) project don't "require" (project options) needed package for DateTimeCtrl. b) LFM file misses something, check it.

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...
Regards, Alexey

Reply by email