Recent

Author Topic: TMyStatusBar with ProgressBar whatever - Statusbar for everyone for everybody!  (Read 5557 times)

wp

  • Hero Member
  • *****
  • Posts: 13192
Perhaps I should have phrased my question differently:
No, I have to apologize: I did not look who submitted the post, I was convinced it was the author itself...

Because these items are missing, I cannot replace the standard status bar using Change Class.
When Lazarus tells you that the new class does not have all the properties of the old class, allow to delete these properties. Save the modified form and I'd recommend to exit and restart the IDE because a cached version of the unmodified unit would still be around and cause trouble. If Lazarus crashes when you allow to delete the properties, you still have the option to manually edit the lfm file (I know - normally I do not recommend to do this, but here you have no other choice):
  • Close the IDE and make a backup copy of the form with the statusbar (both pas and lfm files), just in case...
  • Open the pas file in an external editor, add "MyStatusbar" to the interface uses clause. Find the declaration of the statusbar (normally: Statusbar1: TStatusbar) - change this "TStatusbar" to "TMyStatusbar"
  • Open the lfm file in an external ediitor. Find the block "object Statusbar1: TStatusbar". Replace "TStatusbar" by "TMyStatusbar" again. Remove the following (indented) lines (if available): "SimplePanel = ...", "SimpleText = ....", "ParentShowHint = ...", "ParentFont = ...". If you had to remove "SimplePanel" and/or "SimpleText" you must add code to your unit which adds a panel and writes the "SimpleText" to its Text property.
  • Open the project (with the modified form files) into the IDE. Ideally it loads correctly, now with TMyStatusbar instead of TStatusbar. However, if there are more properties which TMyStatusbar does not implement, the IDE reports unknown properties again (ideally) or crashes. Kill the IDE. Load the lfm file into the external editor again and remove the reported missing properties.
Will TMyStatusBar be further developed by its owner, kefealo, and will the missing elements be added?
Only the owner knows... Let's hope that he did not disappear. If he did I could pick up his work, move it into my ExCtrls package and continue developing it myself - the author's license allows this.

Arend041

  • New Member
  • *
  • Posts: 27
Thank you very much for your detailed response to resolve the issue.
edit: This workaround worked perfectly.
« Last Edit: September 07, 2025, 10:39:10 pm by Arend041 »

kefealo

  • New Member
  • *
  • Posts: 15
Howdy,

Here is the updated version with ParentShowHint, and SimpleText  :D

« Last Edit: September 17, 2025, 03:11:19 pm by kefealo »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4631
  • I like bugs.
It would be nice to have this maintained under revision control somewhere.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

kefealo

  • New Member
  • *
  • Posts: 15
Absolutely agreed with you. Gitlab? What do you think? What is your suggestion?

cdbc

  • Hero Member
  • *****
  • Posts: 2462
    • http://www.cdbc.dk
Hi
Yup... Gitlab is very nice - I use it daily for my projects  8)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6 -> FPC 3.2.2 -> Lazarus 4.0 up until Jan 2025 from then on it's both above &: KDE6/QT6 -> FPC 3.3.1 -> Lazarus 4.99

kefealo

  • New Member
  • *
  • Posts: 15
Quote
Only the owner knows... Let's hope that he did not disappear. If he did I could pick up his work, move it into my ExCtrls package and continue developing it myself - the author's license allows this.

Can I ask you to do it?

I'm happy if you put my control under your ExCtrl package! Give a new name as you want! ;)
I have two more component, sysinfo, version info and timeestimator for long processes.

wp

  • Hero Member
  • *****
  • Posts: 13192
Yes I can do this. But I would like to have the same license for all units in the ExCtrls package. Therefore, I'd ask for your agreement to change the license to LGPL with linking exception (like Lazarus LCL). The component will be named in the style of the other components: TStatusbarEx. How should I give credit to you? With your forum name? Or your real name? (You can send me a PM with that)

kefealo

  • New Member
  • *
  • Posts: 15
If you want to change the license, no probbs. just do it. LGPL is good for me too..
The new name is good, perfect!
My forum name is good for me...

wp

  • Hero Member
  • *****
  • Posts: 13192
Thank you. I added it to ExCtrls (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/exctrls/), renamed some identifiers (removed the "my" altogether). There is one issue, though: The component, if dropped on the form at designtime, flickers heavily due to the ever-running marquee timer. My next change will be to activate the timer only when a marquee progress panel is in use at runtime.

wp

  • Hero Member
  • *****
  • Posts: 13192
Added AutoHint property, an OnDrawPanel event for owner-drawn status panels, as well as BiDiMode support.

 

TinyPortal © 2005-2018