Recent

Author Topic: SpkToolbar component problem  (Read 3226 times)

Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
SpkToolbar component problem
« on: April 26, 2015, 09:08:43 am »
Hi everybody

 I have a problem with component SpkToolbar (ribbon). I want to set up its property

Code: [Select]
SpkToolbar1.Appearance.Pane.GradientType := bkConcave;
but I got
Code: [Select]
unit1.pas(71,50) Error: Identifier not found "bkConcave"
So I tried instead of bkConcave use 'bkConcave' or ('bkConcave') or "bkConcave" or ("bkConcave") and nothing.

Have you got any idea what wrong is?

Thanks

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: SpkToolbar component problem
« Reply #1 on: April 26, 2015, 10:00:44 am »
Ctrl-click on GradientType and you will see its type definition and then the allowed values.
« Last Edit: April 26, 2015, 10:10:44 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
Re: SpkToolbar component problem
« Reply #2 on: April 26, 2015, 10:19:50 am »
Allowed values are
 
Code: [Select]
bkSolid, bkVerticalGradient, bkHorizontalGradient, bkConcave
and they don't work

In this component gradienttype comes from

Code: [Select]
type TSpkElementAppearance = class(TPersistent)
     private
       FDispatch : TSpkBaseAppearanceDispatch;
     protected
       FCaptionFont : TFont;
       FIdleFrameColor : TColor;
       FIdleGradientFromColor : TColor;
       FIdleGradientToColor : TColor;
       FIdleGradientType : TBackgroundKind;
       FIdleInnerLightColor : TColor;
       FIdleInnerDarkColor : TColor;
       FIdleCaptionColor : TColor;
       FHotTrackFrameColor : TColor;
       FHotTrackGradientFromColor : TColor;
       FHotTrackGradientToColor : TColor;
       FHotTrackGradientType : TBackgroundKind;
       FHotTrackInnerLightColor : TColor;
       FHotTrackInnerDarkColor : TColor;
       FHotTrackCaptionColor : TColor;
       FActiveFrameColor : TColor;
       FActiveGradientFromColor : TColor;
       FActiveGradientToColor : TColor;
       FActiveGradientType : TBackgroundKind;
       FActiveInnerLightColor : TColor;
       FActiveInnerDarkColor : TColor;
       FActiveCaptionColor : TColor;     
And TBackgroundKind comes from SpkGUITools unit

Code: [Select]
uses
  LCLType, Graphics, SysUtils, Classes, Controls, StdCtrls, SpkGraphTools, SpkMath;

type
  TCornerPos = (cpLeftTop, cpRightTop, cpLeftBottom, cpRightBottom);
  TCornerKind = (cpRound, cpNormal);
  TBackgroundKind = (bkSolid, bkVerticalGradient, bkHorizontalGradient,
                    bkConcave);   

I tHINK GOT IT!!!!!!!!!!!!! :P :P :P :P :P :P :P :P
I add SpkGUITools in uses
Code: [Select]
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, SpkToolbar,  spkt_Tab, spkt_Pane, spkt_Buttons,SpkGUITools;

and then
                                                   
Code: [Select]
SpkToolbar1.Appearance.Pane.GradientType := bkConcave;

Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
Re: SpkToolbar component problem
« Reply #3 on: April 26, 2015, 10:22:51 am »
Yes, IT WORKS!!!!!!!!!!!!!!!!THANKS ANYWAY


JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: SpkToolbar component problem
« Reply #4 on: April 26, 2015, 01:03:28 pm »
I tHINK GOT IT!!!!!!!!!!!!! :P :P :P :P :P :P :P :P
I add SpkGUITools in uses

Lazarus now draws a red ball on the left editor gutter for compiler errors and warnings. Its popup menu has QuickFix items. See QuickFixMenu.png.
"Search identifier" and "Show Cody dictionary ..." both let you add the missing unit to uses section. See pics.

It can be improved in future. Cody dictionary does not show matches initially when it has not parsed the unit yet.
Also, if Cody dictionary finds only few matches, they could be added to the QuickFix menu directly.

[Edit] Actually the package Cody must be installed before you get the "Show Cody dictionary ..." menu item.
Cody has many useful features but some GUIs are not as user-friendly as they should be. Anyway I recommend it.
« Last Edit: April 26, 2015, 02:46:28 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
Re: SpkToolbar component problem
« Reply #5 on: April 26, 2015, 01:43:59 pm »
I tHINK GOT IT!!!!!!!!!!!!! :P :P :P :P :P :P :P :P
I add SpkGUITools in uses

Lazarus now draws a red ball on the left editor gutter for compiler errors and warnings. Its popup menu has QuickFix items. See QuickFixMenu.png.
"Search identifier" and "Show Cody dictionary ..." both let you add the missing unit to uses section. See pics.

It can be improved in future. Cody dictionary does not show matches initially when it has not parsed the unit yet.
Also, if Cody dictionary finds only few matches, they could be added to the QuickFix menu directly.

I didn't know about it. It's a great feature!!!!!THANKS FOR EXPLAINING

 

TinyPortal © 2005-2018