Recent

Author Topic: Ribbon-like control for Lazarus  (Read 86411 times)

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Ribbon-like control for Lazarus
« Reply #30 on: June 18, 2011, 08:11:17 pm »
Thanks.

Done: http://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/spktoolbar

There's two minor glitches and one access violation at exit, but in general it's working

JD

  • Hero Member
  • *****
  • Posts: 1910
Re: Ribbon-like control for Lazarus
« Reply #31 on: June 18, 2011, 08:35:02 pm »
That was fast! I'll test it ASAP.
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

JD

  • Hero Member
  • *****
  • Posts: 1910
Re: Ribbon-like control for Lazarus
« Reply #32 on: June 18, 2011, 08:39:27 pm »
@LuizAmérico
It compiled without problems but I can't add it to the IDE because the "Register" procedure is missing. See screenshot.
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Ribbon-like control for Lazarus
« Reply #33 on: June 18, 2011, 09:34:16 pm »
The design time is not done yet.

To run the demo, open the package so the ide will find it

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Ribbon-like control for Lazarus
« Reply #34 on: June 18, 2011, 10:55:26 pm »
I added initial design time support

JD

  • Hero Member
  • *****
  • Posts: 1910
Re: Ribbon-like control for Lazarus
« Reply #35 on: June 18, 2011, 11:30:16 pm »
New problem. There is a conflict of names. The Lazarus IDE reports "Ambiguous units found" because I already have Spook's Panel Components installed.

SpkGraphTools.pas, a unit in SpkToolbar is also the name of a unit in Spook's Panel Components
http://wiki.lazarus.freepascal.org/Spook's_Panel_Components

Spook is using the same unit name in these two different projects & the Lazarus IDE can't handle that.

We'll have to change the name of one of these units to get round this conflict.
« Last Edit: June 18, 2011, 11:33:13 pm by JD »
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

spook

  • New Member
  • *
  • Posts: 18
Re: Ribbon-like control for Lazarus
« Reply #36 on: June 18, 2011, 11:37:09 pm »
Hmm, maybe rather extract the SpkGui/Graph/MathTools to separate package and add apropriate dependencies in both packages?

Best regards -- Spook.

JD

  • Hero Member
  • *****
  • Posts: 1910
Re: Ribbon-like control for Lazarus
« Reply #37 on: June 18, 2011, 11:40:55 pm »
@Spook
By the way, your panel components are great. It didn't know how to use it at first since you did not provide a demo/example but I found out by trial & error. Looks like you don't plan on updating it anymore either.  :(
« Last Edit: June 18, 2011, 11:44:11 pm by JD »
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Ribbon-like control for Lazarus
« Reply #38 on: June 19, 2011, 12:12:21 am »
Quote
We'll have to change the name of one of these units to get round this conflict.

I changed name of the older unit

Quote
Hmm, maybe rather extract the SpkGui/Graph/MathTools to separate package and add apropriate dependencies in both packages?

This is the proper solution

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Ribbon-like control for Lazarus
« Reply #39 on: June 19, 2011, 12:18:10 am »
@Spook: what's the reason you are calling RegisterClass to some components. Is this necessary to the Delphi ide recognize them in the form? Under lazarus it seems to be necessary RegisterComponent or RegisterNoIcon calls so they can be recognized by ide

lainz

  • Guest
Re: Ribbon-like control for Lazarus
« Reply #40 on: June 19, 2011, 12:39:59 am »
I has a question why it is slow?

When I mouse over the buttons it is slower than a normal button.

JD

  • Hero Member
  • *****
  • Posts: 1910
Re: Ribbon-like control for Lazarus
« Reply #41 on: June 19, 2011, 01:10:03 am »
@Spook: what's the reason you are calling RegisterClass to some components. Is this necessary to the Delphi ide recognize them in the form? Under lazarus it seems to be necessary RegisterComponent or RegisterNoIcon calls so they can be recognized by ide

I'm getting an error

spktoolbarpackage.pas(1,1) Fatal: Can't find unit RegisterSpkToolbar used by SpkToolbarPackage
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Ribbon-like control for Lazarus
« Reply #42 on: June 19, 2011, 03:42:29 am »
Quote
I'm getting an error

spktoolbarpackage.pas(1,1) Fatal: Can't find unit RegisterSpkToolbar used by SpkToolbarPackage

I 've fixed that

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Ribbon-like control for Lazarus
« Reply #43 on: June 19, 2011, 04:07:58 am »
To show the demo app in the IDE apply the attached patch to Lazarus (svn version)

tomek

  • Jr. Member
  • **
  • Posts: 85
Re: Ribbon-like control for Lazarus
« Reply #44 on: June 19, 2011, 11:24:45 am »
I has a question why it is slow?

When I mouse over the buttons it is slower than a normal button.

Yes, I also notice that.
The problem is with TSpkToolbar.NotifyVisualsChanged and Repaint whole ToolBar on MouseMove change.

 

TinyPortal © 2005-2018