Recent

Author Topic: TCoolBar  (Read 53267 times)

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: TCoolBar
« Reply #30 on: January 30, 2013, 02:41:55 pm »
TControlBar becomes Black when it is made RightToLeft using RightToLeftLayout on MSWindows.
Lazarus Trunk / fpc 2.6.2 / Win32

teos

  • Full Member
  • ***
  • Posts: 161
Re: TCoolBar
« Reply #31 on: January 30, 2013, 09:27:41 pm »
I keep Delphi because of the huge component sets like JCL and JVCL, knowing that they have sort of alike components.

The coolbar is not holding me back from a move to Lazarus. The property grid also does not (there is an alternative property grid available).

I don't think that the components that are part of Delphi are really what is missing. IMHO a lot of people use JCL and JVCL in Delphi and I really think that your effords are better spent on filling that gap.. Sorry if I'm off topic but every time I go back to Delphi, it's because of the extra components, not because of the standard ones..

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4632
  • I like bugs.
Re: TCoolBar
« Reply #32 on: January 31, 2013, 12:09:07 am »
There was a crash in the initial version of CoolBar. It was fixed soon. I should not make last minute changes at night.
More functionality is coming ...

I don't think that the components that are part of Delphi are really what is missing. IMHO a lot of people use JCL and JVCL in Delphi and I really think that your effords are better spent on filling that gap.. Sorry if I'm off topic but every time I go back to Delphi, it's because of the extra components, not because of the standard ones..

LCL is supposed to be (mostly) compatible with VCL. It means you should be able to port a Delphi application easily for Lazarus if it uses only VCL components. Otherwise this claim for VCL compatibility has no substance.

Replacing a component with another fall-back component does not work well because the properties are different.
Trying to convert DeleD 3-D was a good example. Now it should be possible. I will try it again when I gather some energy.

I understood there are many high quality components for Lazarus. Ofter they are not compatible with Delphi components though.
Please forget JCL and JVCL if you want to work with Lazarus. They have so many dependencies for Windows that they will never be ported. The code has very poor quality, everything depends on everything. Small parts can be ported after heavy refactoring and cleaning.
For example the bzip2 lib interface I ported already supported *nix with IFDEFs and everything, but still depended on Windows unit.
So there was no way to compile it for Linux (Nuts!). I extracted it and removed maybe 2/3 of the code and now it works.
This was a simple example, the GUI components are worse.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4632
  • I like bugs.
Re: TCoolBar
« Reply #33 on: March 01, 2013, 07:18:43 pm »
May I ask help? I know here are many graphically talented people.
I would need icons for the component toolbar for both TCoolBar and TControlBar.
Now there are just "placeholder" icons copied from TToolBar.

Anybody interested in helping with the icons?
They can be similar than in Delphi, but not necessarily.

BTW, CoolBar has been in a good shape already for some time. Only important part missing is the run-time dragging of the bands. Now the bands' order can be changed only at design-time.
ControlBar is still rudimentary.

Regards,
Juha
« Last Edit: March 01, 2013, 07:41:04 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: TCoolBar
« Reply #34 on: March 01, 2013, 08:26:56 pm »
Hi,
I cannot force the CoolBar bands to be more in one row. Now (Qt4) each band is in its own row only.
I can try to paint some cool icons in GIMP. I don't know what icon it has in Delphi but it does not matter.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: TCoolBar
« Reply #35 on: March 01, 2013, 08:41:47 pm »
you want something like this or a bit more funcy?

Oh and how many?

EDIT
added a second one with more gradients

the delphi icon can be seen here if any one is interested
http://www.krech.de/Grafix/search.jpg
« Last Edit: March 01, 2013, 08:52:50 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: TCoolBar
« Reply #36 on: March 01, 2013, 08:49:22 pm »
This is a bit off topic, but I tested TCoolBar using RightToLeftLayout on MSWindows and I'm happy to say that it seems to work fine. 

However, for other OS's maybe it should have BiDiMode published and implemented?  I really don't know if this is true or not because I work only with MSWindows.

Anyway, very nice work :)
Lazarus Trunk / fpc 2.6.2 / Win32

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: TCoolBar
« Reply #37 on: March 01, 2013, 09:38:02 pm »
I guess I spoke too soon when I said it works fine with RightToLeftLayout.  When I try to resize the Form at RunTime, I get this Error:

"TWinControl.WMSize loop detected, the widgetset does not like the LCL bounds or sends unneeded wmsize message: Edit1:TEdit.BoundsRealized=l=61,t=3,r=593,b=27 NewBoundsRealized=l=593,t=3,r=1125,b=27" 
Lazarus Trunk / fpc 2.6.2 / Win32

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4632
  • I like bugs.
Re: TCoolBar
« Reply #38 on: March 01, 2013, 10:35:17 pm »
I cannot force the CoolBar bands to be more in one row. Now (Qt4) each band is in its own row only.
I can try to paint some cool icons in GIMP. I don't know what icon it has in Delphi but it does not matter.

Blaazen, that is how CoolBar works. The bands are top aligned, each occupying one row. At least that is my understanding.
Typically the component on a band is ToolBar.
The other component, ControlBar, allows you to put many bands / components on one row, but the layout algorithm is not implemented yet.

Quote from: taazz
you want something like this or a bit more funcy? Oh and how many?

taazz, your pics look more like file or folder icons. I think they should represent the bands somehow.

Quote
the delphi icon can be seen here if any one is interested

Yes, that is CoolBar.
ControlBar is in the Additional tab and its icon looks almost the same.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: TCoolBar
« Reply #39 on: March 01, 2013, 10:59:59 pm »
Quote
Blaazen, that is how CoolBar works. The bands are top aligned, each occupying one row. At least that is my understanding.
Typically the component on a band is ToolBar.
I am not sure. I have no Delphi, I only can search screenshots on web.
Here: http://prof-xaker.at.ua/load/iskhodniki/raznoe/ispolzovanie_komponenta_tcoolbar/88-1-0-1123 are more bands in one row (but I agree: one component in each band).
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: TCoolBar
« Reply #40 on: March 01, 2013, 11:04:04 pm »
You can have multiple controls in one band  in you add them to a TPanel and then make the TPanel the Band.Control:= the TPanel.
Lazarus Trunk / fpc 2.6.2 / Win32

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4632
  • I like bugs.
Re: TCoolBar
« Reply #41 on: March 01, 2013, 11:16:05 pm »
This is a bit off topic, but I tested TCoolBar using RightToLeftLayout on MSWindows and I'm happy to say that it seems to work fine. 

However, for other OS's maybe it should have BiDiMode published and implemented?  I really don't know if this is true or not because I work only with MSWindows.

I published BiDiMode in r40455 for both CoolBar and ControlBar.
It is unfortunate it gives an "TWinControl.WMSize loop detected" error with RightToLeftLayout on Windows.

Quote
Anyway, very nice work :)

Thanks for the feedback.
I have no time to solve RightToLeftLayout problems now but maybe you could debug the code.
The code for CoolBar is quite clean and compact. The implementation part is less than 600 lines now.
The whole band and associated component placement is done in AlignControls.
Please take a look.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: TCoolBar
« Reply #42 on: March 01, 2013, 11:22:08 pm »
I will take a look but I am not too hopeful.  I have the same problem and error with TComboBox if any component is anchored to anything and RightToLeftLayout is used.  I've looked for this problem for weeks and can't find where things go wrong.
Lazarus Trunk / fpc 2.6.2 / Win32

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: TCoolBar
« Reply #43 on: March 01, 2013, 11:47:25 pm »
I found this article: http://stackoverflow.com/questions/6543213/delphi-tcoolbar-ttoolbartedittcheckbox
It is described there: If property Break = True then Band starts at a new row. Otherwise it continues on the same row next to previous Band.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4632
  • I like bugs.
Re: TCoolBar
« Reply #44 on: March 01, 2013, 11:53:54 pm »
I am not sure. I have no Delphi, I only can search screenshots on web.
Here: http://prof-xaker.at.ua/load/iskhodniki/raznoe/ispolzovanie_komponenta_tcoolbar/88-1-0-1123 are more bands in one row (but I agree: one component in each band).

That looks like a TControlBar. Maybe they mixed the name.
I did not find a way to put bands on one row in Delphi. If someone finds a way, please tell me.

[Edit:] I saw your new post:
>  If property Break = True then Band starts at a new row
It means the layout system needs much more work. It starts to resemble the ControlBar layout algorithm (which is not implemented either).

You don't have any Delphi version? There are some "backup" copies old old Delphi versions in internet. Downloading such backup copy even for testing purposes is not legal so I don't recommend it of course.
My employer bought the copies I use myself.

Juha
« Last Edit: March 02, 2013, 12:17:02 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018