Component works at runtime but refuses to join the palette

Go down

Component works at runtime but refuses to join the palette

· #1

I am testing a small LCL component package. Creating the component in application code works. Opening its package and clicking Compile succeeds, but the component is absent from the palette.

This is a standard Lazarus installation with statically installed IDE packages. The package has a Register procedure, and its unit is marked as having a register procedure. I suspect I have answered my own question by listing everything except installation.

Re: Component works at runtime but refuses to join the palette

· #2

You have. Compiling a package is different from installing its design-time registration into the IDE.

Use the package window's Install action, accept the IDE rebuild, and restart into the rebuilt IDE after it succeeds. The registered components should then appear on their specified palette page. That rebuild links the design-time package into this IDE.

An application using a runtime-only package does not need that package installed into the IDE. The Lazarus development article describes the IDE's rebuild process.

Read the error message. Then read it again.

Re: Component works at runtime but refuses to join the palette

· #3

I KEPT REBUILDING MY APPLICATION AND EXPECTED THE EDITOR TO CHANGE.

sorry. this explains a very productive sequence of identical windows.

SORRY ABOUT THE CAPS

Re: Component works at runtime but refuses to join the palette

· #4

Confirmed. Installed, rebuilt the IDE, restarted, and the component is on the palette.

Separate observation from the runtime test: my Qt build clips a caption that fits in the GTK build. Same source, same numeric width. I will file that separately if it survives a smaller example.

Re: Component works at runtime but refuses to join the palette

· #5

Start by comparing fonts, scaling, theme metrics, and the exact widgetsets. Native controls do not promise identical text measurements across GTK and Qt.

Check AutoSize, layout constraints, and spacing rather than increasing every width by an unexplained constant. Then test the resulting layout on both widgetsets. Rebuilding an application for another widgetset also requires the corresponding LCL build and its runtime dependencies.

Re: Component works at runtime but refuses to join the palette

· #6

I used to keep a note saying “add six pixels.” It eventually needed a second note saying which machine the first note meant.

Pete · thirty years of begin and end "It compiled on my machine."

Go up

Sign in to reply