Recent

Author Topic: Implementing new components  (Read 9870 times)

FelipeFS

  • New Member
  • *
  • Posts: 14
Implementing new components
« on: December 04, 2012, 11:49:49 am »
Note: the title of this topic was changed in order that I will include new implemented components here.

Component list:
TTabSetAlmost completed
TBackstageTabSetAlmost completed
TNewScrollbarCompleted
TToolBarMaking implementations for TActionToolBar looking
TControlBarHalf-done
TCategoryButtonsPlanned


TTabSet - Since Lazarus has no TTabSet, I created my own months ago, I'm rewriting the code(including some events like "OnDrawTab", so the user could customize the drawing). Currently, this is how the component looks like:
[TTabSet Screenshot]
Features:
  • Focus, with implementation on the KeyDown procedure, so the user can navigate between the tabs using the keyboard.
  • Currently, the tabs can contain one icon/button on the right side, but I will improve it, probably there will be a collection of items, each item will represent a icon/button.
  • The scroll buttons are images that you select from a TImageList - you have option to choose the image when the scroll button is down, highlighted and normal.
  • Still need to implement the vertical orientation of the tabset.

TBackstageTabSet - If you don't know what backstage is, it is the lateral bar on the left side of this image:
[Office 2010 Backstage interface]

Here is a screenshot of the TBackstageTabSet:
[TBackstageTabSet screenshot]

Features:
  • The backstage have a orientation: to top, to botom, to left, to right. Note the arrow in the selected tabs.
  • You can use a TImageList. Also can define if the image will be displayed on the top, left, right or bottom side of the text.
  • The text(and the image) can be aligned. If the backstage orientation is to top/bottom, the you can align the text and image to the corner of top, bottom or center, but if the orientation if to left/right, then you can align to left, right or center. Note that the items of the left backstage on the screenshot is aligned to left.
  • Event OnDrawTab, with informations of the position of each item: rectangle of the tab, and position where the text and image should be displayed.
  • Focus, you can navigate using the keyboard - like the TTabSet.

Implementation of the TToolBar - I'm including the feature to draw a gradient background, and if the user choose the gradient background, then the buttons will have a flat drawing, like this:
http://i.stack.imgur.com/UkuXD.gif

They are almost done, when they get completed, I will publish.
« Last Edit: December 08, 2012, 10:11:01 pm by FelipeFS »

Hydexon

  • Full Member
  • ***
  • Posts: 170
Re: Creating TTabSet, TBackstageTabSet and implementing TToolBar
« Reply #1 on: December 04, 2012, 03:39:46 pm »
It's a very great components, Office 2011 Styled and Visual Studio Look components!, i hope finished it and available for the Lazarus Community.

Great work, Keep it!.
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

lainz

  • Guest
Re: Creating TTabSet, TBackstageTabSet and implementing TToolBar
« Reply #2 on: December 04, 2012, 04:29:07 pm »
Hey nice, When you get it released maybe I or other BGRAControls contributor can port it to use BGRABitmap.

JD

  • Hero Member
  • *****
  • Posts: 1908
Re: Creating TTabSet, TBackstageTabSet and implementing TToolBar
« Reply #3 on: December 04, 2012, 06:30:29 pm »
Wonderful. I'll be looking forward to the finished component. Keep up the good work.

JD
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

FelipeFS

  • New Member
  • *
  • Posts: 14
Re: Creating TTabSet, TBackstageTabSet and implementing TToolBar
« Reply #4 on: December 06, 2012, 08:32:17 pm »
Thank you guys!

I'm finishing the TTabSet now, but I want your opinions:

I'm using TStrings to create tabs. But if I use TCollections instead of TStrings, the user will be able to choose different ImageIndex from a TImageList for each tab. If I use TStrings, all tabs will have the same image from TImageList. Also, with TCollectionItem, the user will have an OnCloseButtonClick for each tab.

What do you think? TStrings or TCollection?

FelipeFS

  • New Member
  • *
  • Posts: 14
Re: Creating TTabSet, TBackstageTabSet and implementing TToolBar
« Reply #5 on: December 06, 2012, 08:37:16 pm »
Plus:

Should I include this feature of vertical oriented text?
http://flylib.com/books/2/37/1/html/2/images/fig06_02.jpg

Hydexon

  • Full Member
  • ***
  • Posts: 170
Re: Creating TTabSet, TBackstageTabSet and implementing TToolBar
« Reply #6 on: December 06, 2012, 10:18:07 pm »
It's better to use TCollection and the plus what at you're saying is okay.
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

FelipeFS

  • New Member
  • *
  • Posts: 14
Re: Creating TTabSet, TBackstageTabSet and implementing TToolBar
« Reply #7 on: December 07, 2012, 04:34:29 am »
The TTabSet is working pretty well. Now I will change from TStrings to TCollection, then.

Screenshots(Tab positon/Text orientation):
Top/Horizontal
Left/Vertical
Right/Vertical
Bottom/Horizontal
Top/Vertical
Left/Horizontal
Right/Horizontal
Bottom/Vertical

This is the only tab style avaliable, but using OnTabDraw, OnBackgroundDraw you can implement your own style.

Hydexon

  • Full Member
  • ***
  • Posts: 170
Re: Implementing new components
« Reply #8 on: December 20, 2012, 04:23:00 pm »
Hey @FelipeFS how are you with these components?. are good looking!, (sorry for my english)
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

raulparraco

  • Newbie
  • Posts: 5
Re: Implementing new components
« Reply #9 on: December 27, 2012, 05:21:33 am »
please where you can download these components

FelipeFS

  • New Member
  • *
  • Posts: 14
Re: Implementing new components
« Reply #10 on: January 30, 2013, 08:16:49 pm »
Sorry for the absence. I have been busy at my university.

There is no big progress, also there is no documentation. The backstage and tabset are working fine. But there are others components still in progress. Here is the link for download:

https://sourceforge.net/projects/propackide/

It is called Lazarus Professional IDE Package because i'm making these components for the development of IDEs. The component TBoxVisualProgramming, for example, is planned to be like this:
http://simonjgrey.files.wordpress.com/2012/08/stencyl2.jpg?w=640

EDIT: One thing I forgot. The TNewTabset has a property called "TabHeight" and it is 0 by default, change it to a number greater than 0 and you will be able to see the tabs.
« Last Edit: January 30, 2013, 08:30:14 pm by FelipeFS »

teos

  • Full Member
  • ***
  • Posts: 161
Re: Implementing new components
« Reply #11 on: January 30, 2013, 09:19:32 pm »
Felipe, I have downloaded the zip file from Sourceforge because I think your Visual Programming idea is highly interesting.

However in my Lazarus version (1.04) I get an error on line 1724 in PropackIDEbase.zip:

      if (Self.FAttachTo is TPage) and (Self.FAttachTo.Parent <> nil) then ...

Lazus means:

propackidebase.pas(2140,26) Error: Class or Object types "TScrollingWinControl" and "TPage" are not related

I wonder how these errors arise: differences in Lazarus and/or platform or..?

lainz

  • Guest
Re: Implementing new components
« Reply #12 on: January 30, 2013, 09:30:22 pm »
Me too, but if you comment all the error it compiles and "works".. at least to test withouth that..

 

TinyPortal © 2005-2018