Lazarus

Announcements => Third party => Topic started by: AlexTP on May 26, 2014, 04:46:08 am

Title: ATTabs
Post by: AlexTP on May 26, 2014, 04:46:08 am
This is Delphi/Lazarus lite tab control, not OS-dependant.
Documentation:
http://wiki.freepascal.org/ATTabs

You can see screenshot on github.
Now it's Lazarus designer aware too.
Title: Re: ATTabs 0.9 beta
Post by: x2nie on May 26, 2014, 06:04:26 am
(Note - it's not Lazarus designer aware, you need to create TATTabs at runtime, see example at wiki. I didn't want it.)
what do you mean with "I didn't want it"?
Do you want to improve it to be "Lazarus designer aware" ? If so, I will contribute.


Sorry for my bad english. I really don't understand, it seem ambiguous for me.


I am looking for a TTabset (Delphi) implementation in Lazarus, which is has similar appearance to this component.
I am forking your work, today.


Anyway, good luck and thanks you.  8-)

Title: .
Post by: AlexTP on May 26, 2014, 04:43:56 pm
I mean: I don't need to design tabs in Lazarus designer, it's not good- a) need to recompile Laz after installing tab ctl, b) need editor of tabs - caption, font, color, sizes...
Title: -
Post by: AlexTP on May 28, 2014, 01:20:19 am
Added drag-drop of tabs, fixed something, released.
Title: Re: ATTabs 0.9 released
Post by: kapibara on May 29, 2014, 04:38:16 am
I now use ATTabs for a small app under windows. Hope the issue with linux gets fixed.

thanx, and keep up the good work.
Title: -
Post by: AlexTP on June 01, 2014, 07:22:48 pm
Fix: paintin of "x" on Linux
Title: -
Post by: AlexTP on June 04, 2014, 05:19:52 am
Add: More correct owner-draw callback.
Title: Re: ATTabs 1.0 released
Post by: kapibara on June 05, 2014, 04:10:00 am
Hi, the demo under Lazarus needs to add unit 'types' in the uses for function InflateRect.
Title: -
Post by: AlexTP on June 05, 2014, 05:10:50 am
I fixed.
Title: Re: ATTabs 1.0 released
Post by: pacopenin on June 05, 2014, 10:31:01 am
Thanks,  :)
Title: Re: ATTabs 1.0 released
Post by: Derit on June 05, 2014, 10:53:38 am
This could be a third party component
you can drag and drop from component parlete...
see this
http://wiki.freepascal.org/How_To_Write_Lazarus_Component (http://wiki.freepascal.org/How_To_Write_Lazarus_Component)
Title: -
Post by: AlexTP on June 15, 2014, 06:10:33 am
Added "bottom tabs" style (TabBottom=true).
Title: -
Post by: AlexTP on August 19, 2014, 03:08:27 pm
Version 1.1.x. Now it's tested, in real application SynWrite. It works as expected, minor issues fixed.
Title: Re: -
Post by: esvignolo on August 20, 2014, 11:31:06 pm
Version 1.1.x. Now it's tested, in real application SynWrite. It works as expected, minor issues fixed.

Hi Alex22 can u share the SynWrite build into FPC? Do u make it multi-plattaform?

Thanks
Title: Re: ATTabs 1.1 released
Post by: AlexTP on August 21, 2014, 12:16:58 am
Synwrite IS NOT connected to FPC. It's my Win application like Notepad++
Title: Re: -
Post by: esvignolo on August 21, 2014, 12:31:41 am
Version 1.1.x. Now it's tested, in real application SynWrite. It works as expected, minor issues fixed.

Work on delphi too?


Version 1.1.x. Now it's tested, in real application SynWrite. It works as expected, minor issues fixed.

Hi Alex22 can u share the SynWrite build into FPC? Do u make it multi-plattaform?

Thanks
Title: -
Post by: AlexTP on August 21, 2014, 12:34:50 am
U see word "Delphi" on github page? yes. So Delphi too
Title: Re: ATTabs 1.1 released
Post by: esvignolo on August 21, 2014, 12:35:39 am
Thanks
Title: Re: ATTabs 1.1 released
Post by: pacopenin on September 04, 2014, 05:51:40 pm
Support icons in Tabs?

Thanks.
Title: -
Post by: AlexTP on September 04, 2014, 05:59:48 pm
Can draw icons using custom-draw.

BTW, ATTabs 1.2 released.
Title: Re: ATTabs 1.2 released
Post by: lanmi on February 08, 2016, 01:34:58 pm
HI,
Good work Alex. I 've tested ATTAbs on Win8.1 and Ubuntu 15.04 with 1.4.4 lazarus and all working good so far. I like creating components at runtime. I tried your example with TFrame as components container and also add TabTag property into TATTabData object for easier relations with Tframes. Do you have other approach to this issue? Thank you and keep up with good work.
Title: Re: ATTabs 1.2 released
Post by: AlexTP on February 08, 2016, 01:37:32 pm
With what issue? What is prob you are solving.
Title: Re: ATTabs 1.2 released
Post by: lanmi on February 08, 2016, 02:02:20 pm
Well, it's not an issue, only want know how you use tabs in real application. I mean, when I create tabs at runtime i also create Tframe at runtime which will "connected" with the tab over this newly introduced TabTag property(both will have same tag number). O yes, thank you for your prompt response :)
Title: Re: ATTabs 1.2 released
Post by: AlexTP on February 08, 2016, 02:29:08 pm
Well... create Tabs, create for each tab Frame. Place into tab's TabObject - link to frame. When user makes tab 3 active, you do GetTabData for index 3,
in TabData you have TabObject--it's link to frame.
Title: Re: ATTabs 1.2 released
Post by: lanmi on February 08, 2016, 02:38:16 pm
Ok, i will try that. Thanks again
Title: Re: ATTabs 1.2 released
Post by: lanmi on February 08, 2016, 03:59:29 pm
This is how I did to set visible speciffic frame and set active tab. i removed TabTag property as it is not needed. Thanks again.

Code: Pascal  [Select][+][-]
  1. procedure TForm1.ShowFrameByTag(frametag:integer);
  2.  var
  3.  d: TATTabData;
  4.  i:integer;
  5.  begin
  6. for i:=0 to t.TabCount-1 do begin
  7.  d:= t.GetTabData(i);
  8.  if (d.TabObject as Tframe).tag=frametag then begin
  9.  t.TabIndex:=i;
  10. (d.TabObject as Tframe).Show end else
  11. (d.TabObject as Tframe).Hide;
  12.    end;
  13.   end;
  14.  
  15.  
  16.  
Title: Re: ATTabs 1.2 released
Post by: AlexTP on March 28, 2017, 05:30:40 pm
This is ATTabs fix which is made today:
"x" buttons were pressed by mouse-down, and they must press like in all Windows apps by mouse-down/mouse-up (click),
this is fixed, now x pressed on mouse-up.
Title: Re: ATTabs
Post by: valdir.marcos on April 15, 2017, 08:50:52 am
Code: Text  [Select][+][-]
  1. https://github.com/Alexey-T/ATTabs
  2. readme.md:
  3. Documentation is at the Wiki page of github.

Where is the documentation for ATTabs?
Wiki seems to be invisible or blocked.
Title: Re: ATTabs
Post by: valdir.marcos on April 15, 2017, 09:00:37 am
Code: Pascal  [Select][+][-]
  1. procedure TfrmMain.AddTabSheet(NewForm: TForm; ImageIndex: Integer);
  2. var
  3.   TabSheet: TTabSheet;
  4.   Form: TForm;
  5. begin
  6.   TabSheet := TTabSheet.Create(Self);
  7.  
  8.   TabSheet.PageControl := PageControl1;
  9.   TabSheet.Caption := Form.Caption;
  10.   TabSheet.ImageIndex := ImageIndex;
  11.  
  12.   Form := NewForm.Create(TabSheet);
  13.   Form.Parent := TabSheet;
  14.   Form.ParentWindow := TabSheet.Handle;
  15.   Form.Align := alClient;
  16.   Form.BorderStyle := bsNone;
  17.   Form.Show;
  18.  
  19.   PageControl1.ActivePage := TabSheet;
  20. end;
  21.  

How can I transform the above TPageControl code to insert a TForm in a TTabSheet in the below ATTab code for a new tab?

Code: Pascal  [Select][+][-]
  1. procedure TForm1.btnAddClick(Sender: TObject);
  2. begin
  3.   t.AddTab(t.TabIndex+1, 'test '+StringOfChar('n', Random(20)), nil, false, Random(65000));
  4. end;
  5.  

How will I be able close the tab with the Form embedded?
How will I be able to prevent the same Form to be opened more than once?

Thanks for your effort and patience.
Title: Re: ATTabs
Post by: AlexTP on April 15, 2017, 10:10:27 am
>Where is the documentation for ATTabs?
 

It was blocked. Now: https://github.com/Alexey-T/ATTabs/wiki
Title: Re: ATTabs
Post by: howardpc on April 15, 2017, 11:18:05 am
How can I transform the above TPageControl code to insert a TForm in a TTabSheet in the below ATTab code for a new tab?
How will I be able close the tab with the Form embedded?
How will I be able to prevent the same Form to be opened more than once?

I think embedding a form in this way is an abuse of TForm which was never designed to be so used.
It is far too over-engineered and resource-hungry to be a good choice, and there are many alternative containers that would suit
your purpose better, among them TFrame, TPanel, TGroupBox, TScrollBox etc.
However, if you insist on embedding a form, I think the following would do it.
Code: Pascal  [Select][+][-]
  1. function TForm1.AddedTabSheet(aPageControl: TPageControl; aNewForm: TForm;
  2.   anImageIndex: Integer; const aTabCaption: string): TTabSheet;
  3. var
  4.    ts: TTabSheet;
  5. begin
  6.   ts:=TTabSheet.Create(Self);
  7.   try
  8.     ts.PageControl:=aPageControl;
  9.     ts.ImageIndex:=anImageIndex;
  10.     ts.Caption:=aTabCaption;
  11.  
  12.     aNewForm.Parent:=ts;
  13.     aNewForm.Align:=alClient;
  14.     aNewForm.BorderStyle:=bsNone;
  15.     aNewForm.Show;
  16.  
  17.     aPageControl.ActivePage:=ts;
  18.   except
  19.     ts:=nil;
  20.   end;
  21.   Exit(ts);
  22. end;    
You then have problems controlling scrolling. You close the tab by freeing it, or hiding it. If you free it, you have to make sure the form is also freed, or at least that its Parent is set to nil (if you have created the form via Application.CreateForm it will be freed by the Application).
Altogether a poor solution to the task of fitting a component container into a tabsheet.
What is wrong with adding controls to the tabsheet directly, with no intervening form?
Title: Re: ATTabs
Post by: AlexTP on April 15, 2017, 12:06:30 pm
I can give only info from Wiki,
http://wiki.freepascal.org/ATTabs#How_to_use_it_like_TPageControl
Title: Re: ATTabs
Post by: valdir.marcos on April 15, 2017, 05:43:33 pm
I think embedding a form in this way is an abuse of TForm which was never designed to be so used.
It is far too over-engineered and resource-hungry to be a good choice, and there are many alternative containers that would suit your purpose better, among them TFrame, TPanel, TGroupBox, TScrollBox etc.
What is wrong with adding controls to the tabsheet directly, with no intervening form?

I agree with you, but we are limited to schedule and budget.
We should convert a 600+ unit old delphi 7 RAD DB SDI application to be TDI (tabbed similar to Firefox).
First, we changed TMenu to TTreeView and main form from SDI to TPageControl. I know it's still an SDI application, but the final user feels like it's a TDI application.
Then, manually, we are rewriting all units, forms and datamodules as similar and as fast as possible, changing as little code as we can.
It's a third party project with client's programmers being trained and co-working with us. Unfortunately, we are not free to make all decisions on development. The client's programmers will maintain the project afterwards.
If we could, we would rewrite everything from scratch using OOP, ORM and tests.
Now, we want to change from TPageControl to something visually more beautiful.
Title: Re: ATTabs
Post by: AlexTP on April 15, 2017, 10:14:32 pm
Btw, if you use in big application, you may want features.
Welcome, for donates.
600 forms -is big one.
Title: Re: ATTabs
Post by: valdir.marcos on April 16, 2017, 03:44:03 am
It is a medium size project done by a medium size team.
A big size project is an ERP, which take years to be done by a big size team.
You are right, I always suggest donations on corporate projects that need open source projects.
Title: Re: ATTabs
Post by: majid.ebru on April 17, 2017, 03:53:58 pm
Hi
.
how can i change direction  RTL(Right to Left) ATTabs ??
.
some language like farsi and arabic direction is RTL.
.
Title: Re: ATTabs
Post by: valdir.marcos on April 17, 2017, 04:30:08 pm
Read somewhere TTabControl is for cases where you have same controls on each tab, was sticked to that ...
Thats right. "Same" = "SynEdit with same content"
Therefore you need to manage the content yourself. However if you do that you loose undo info. So not good.

TATTabs is similar to TTabControl in the context that you have same all controls on each tab?
Title: Re: ATTabs
Post by: AlexTP on April 17, 2017, 04:37:06 pm
About RTL order:
control dont support it, sorry.
It is work for donations.
Title: Re: ATTabs
Post by: majid.ebru on April 17, 2017, 06:48:55 pm
 :'( :'( :'( :'( :'(
Title: Re: ATTabs
Post by: AlexTP on July 25, 2017, 10:24:47 am
Update

This is long time wanted feature.
+ prop Images (ImageList)
+ each tab's Data has TabImageIndex

It can show icons from Imagelist. Icon, if shown, shift text to the right.
Picture example.
Title: Re: ATTabs
Post by: AlexTP on September 16, 2017, 12:36:02 pm
Big update: added scroll arrows (option of course) to scroll tabs which don't fit to client rect. Only arrows are like ST3, but tabs do not stack like in ST3. I dont think making stacking of tabs is good here. I dont like how it works in ST3. Simple scrolling of client area is good.

Quote
2017.09.15
+ add: scrolling arrows, they work when tabs painted out of right side (when lot of tabs)
+ add: scrolling mark (red on top if lot of tabs)
+ add: prop TabShowScrollArrows (note: it uses TabIndentInit)
+ add: prop TabShowScrollMark
+ add: prop TabScrollMarkX, TabScrollMarkY
+ add: prop ColorScrollMark
+ add: prop TabAngleMaxTabs: slow TabAngle will be used only until not much tabs
* renamed prop to ColorDropMark
* renamed type to TATTabTriangle, with values


And new is scroll mark (option).
it is red (option) 20x4 pixel (option) line, it shows on top of ATTabs, if tabs are scrollable.
Title: Re: ATTabs
Post by: taazz on September 16, 2017, 03:35:04 pm
If you do not mind suggestions, I would like to see the control being able to place the tabs  on the left and right with text rotation and if possible scroll through the mouse scroll wheel too. As for the stacking and ST3 I have no idea what are you talking about. If by stacking you mean multiple rows then you should consider implementing it. As for ST3....
Title: Re: ATTabs
Post by: AlexTP on September 16, 2017, 04:24:32 pm
ST3 = Sublime Text 3. It has stacking of tabs: press Ctrl+N 50 times, you ll see stack of tabs.
Title: Re: ATTabs
Post by: taazz on September 16, 2017, 05:08:05 pm
ST3 = Sublime Text 3. It has stacking of tabs: press Ctrl+N 50 times, you ll see stack of tabs.
thank you. I'll check it out when I get some time.
Title: Re: ATTabs
Post by: AlexTP on September 17, 2017, 10:14:14 am
Update

renamed lot of properties from TabNNNN to OptYYYYYY (with different YYYYYY). sorry, user of ATTabs. prev names were short and I forgot meanings of some props. So I made longer names.
Title: Re: ATTabs
Post by: AlexTP on September 23, 2017, 09:14:19 am
now prop OptButtonLayout here.
it sets buttons on left, on right.
possible buttons:

<
>
v
+

possible layouts (separator ,):

,v
<>,v
<>,v+
<>v,
,<>v
,<>v+
<,>
<,>v
v<,>
...etc


change:
plus-tab paints not via font. but via Canvas.Line.

change:
can show plus-tab and plus-button. or one of them.
plus-button better. its not hidden if 100 tabs.

Title: Re: ATTabs
Post by: AlexTP on September 23, 2017, 04:26:12 pm
Added wiki file (see MD files in Github) for all properties:

https://github.com/Alexey-T/ATTabs/blob/master/wiki/options.md
Title: Re: ATTabs
Post by: AlexTP on October 06, 2017, 06:28:27 pm
Added option of flat mode:
- OptShowFlat
- OptActiveMarkSize (for new mode)
- ColorActiveMark (for new mode)

Flat mode looks like in screenshot - of CudaText
Title: Re: ATTabs
Post by: AlexTP on October 11, 2017, 02:26:50 pm
Big update

Added prop OptPosition (enum: top/bottom/left/right)
Aded prop OptSpacer, OptSpacer2 (spacer2 is only for left/right position)

Text is painted horizontal anyway.
Screenshot of new demo with left kind
Title: Re: ATTabs
Post by: AlexTP on October 12, 2017, 02:49:12 pm
Update

- sorry: I renamed 4 enums values [they were named not nice for me, e.g. long name tabPositionLeft renamed to atpLeft]
You will need to rename ids in app.

- added 4 props: OptColoredBandForLeft/ ForRight/ ForTop/ ForBottom
Title: Re: ATTabs
Post by: AlexTP on October 20, 2017, 12:36:44 pm
Update

Added OptCaptionAlignment (enum: left/right/center).
Title: Re: ATTabs
Post by: AlexTP on October 20, 2017, 01:20:39 pm
Update

Added OptIconPosition: enum.
It can show Imagelist icons: lefter than text, centered, above text.
Title: Re: ATTabs
Post by: AlexTP on October 25, 2017, 08:35:22 am
Change

Removed 2 props for angled tabs: OptTabAngle and one more. reason for removing: - ugly source code pasted from inet to paint smooth pixel lines, - angled tabs paint slow if 10+ tabs shown and mouse moves over tabs, - they paint ugly on macOS retina.

Todo: make smooth tabs w/o painting pixels, but use png files.
Title: Re: ATTabs
Post by: AlexTP on October 28, 2017, 10:53:09 pm
Returned angled tabs.
OptShowAngled.
but code was rewritten. now Pixels[] not used, it is faster.
changed logic of considering angled tabs in painting too. so if you set angled tabs, you must
- set OptSpaceBetweenTabs
- set OptSpaceInitial
Title: Re: ATTabs
Post by: AlexTP on November 05, 2017, 09:55:30 am
Update

It is long long time awaited feature. I was surprised that I did it from nothing
in single evening. And did two features: OptVarWidth - show tabs of variable
width. And after it I did OptMultiline - show multi-line tabs in top/bottom
OptPosition (not in left/right OptPos).
It was possible only coz code was designed good.
It was place, which was possible to change- UpdateTabRects() func.
And then several micro places to change- to adapt to multiline.
Demo_lazarus shows multiline- checkbox toggles it for top tabs.

Title: Re: ATTabs
Post by: AlexTP on November 07, 2017, 02:26:02 pm
Update:
now can set special font color / font style (e.g. underline) for mouse-over (hot) tabs, active tab.

2017.11.07
+ add: custom-draw event called for spacer (rect below tabs) too
+ add: prop ColorFontActive
+ add: prop ColorFontHot
+ add: prop OptActiveFontStyle, OptActiveFontStyleUsed
+ add: prop OptHotFontStyle, OptHotFontStyleUsed
* changed: renamed prop to OptSpaceBetweenLines
Title: Re: ATTabs
Post by: AlexTP on November 09, 2017, 07:57:59 am
Update

IDE designer can design all props of Tabs.Items: caption, modified, fontstyle, imageindex etc.
This is because Tabs is TCollection now, I didn't know such a trick.
Title: Re: ATTabs
Post by: AlexTP on November 20, 2017, 12:55:09 pm
Update

Now multi-line tabs can auto-fill control's width, for all lines except last line. Prop added OptFillWidth.
W/o this prop, lines have variable width and not aligned.
And prop OptFillWidthLastToo: for last wrapped line of tabs.

Screenshot of demo with prop ON.
Title: Re: ATTabs
Post by: AlexTP on November 21, 2017, 09:23:44 am
Update

Multi-line tab captions are supportted- with LF (#10) char, any LF count, but you must set big OptTabHeight by yourself.
Title: Re: ATTabs
Post by: AlexTP on November 25, 2017, 08:59:34 pm
Update

- fix compiling on Delphi7..10
- support for WideString on Delphi7

Added ATGroups component to ATTabs repo. Readme - see on github.
Title: Re: ATTabs
Post by: AlexTP on February 14, 2018, 02:12:36 pm
Update
Made change for CudaText editor, to make it like Sublime Text. now click on passive tab x-icon dont activate this tab. Only click on caption area of tab does activate.
Title: Re: ATTabs
Post by: AlexTP on February 24, 2018, 08:47:54 pm
Update
add: Data.TabHint field; work of per-tab hints on mouse move (tested on demo).
Title: Re: ATTabs
Post by: AlexTP on March 07, 2018, 04:34:58 pm
Major update/fix

2018.03.07
+ add: method MakeVisible (it's called when changing TabIndex)
+ add: method IsTabVisible
+ add: methods GetTabRect*: added param AWithScroll
+ add: method SwitchTab: added param ALoopAtEdge
Title: Re: ATTabs
Post by: AlexTP on April 02, 2018, 10:19:20 am
Update (from GH reports)

2018.03.25
+ add: vertical tabs now have variable height if OptVarWidth
+ add: public prop ScrollPos
+ add: public method DoScrollAnimation
+ add: Data (TATTabData) has new props:
++ TabSpecialWidth (for horz tabs)
++ TabSpecialHeight (for vert tabs)
Title: Re: ATTabs
Post by: AlexTP on June 03, 2018, 11:13:12 am
Updates

2018.06.02
- fix: custom-drawn tabs cannot be painted with x mark
2018.06.01
* change: instead of Font.Color, now set prop ColorFont
2018.05.21
* change: ATGroups: OnTabPopup event has 2 more params
2018.05.20
+ add: ATGroups: add method MoveTabsFromGroupToAnother
Title: Re: ATTabs
Post by: AlexTP on August 30, 2018, 11:12:36 am
Updates for last 2 months

2018.08.30
+ add: ATTabs: option OptWhichActivateOnClose (right tab or recent tab)
+ add: ATTabs: event OnTabGetTick to support option above
+ add: ATGroups: option above is exposed in SetTabOption()

2018.08.13
+ add: ATGroups: added modes "6 vert", "6 horz"

2018.06.05
+ add: TATTabData has new prop TabHideXButton (to hide x for some tabs)
- fix: wrong color of X mark in "flat" mode
Title: Re: ATTabs
Post by: AlexTP on August 30, 2018, 06:16:24 pm
Added event OnTabGetCloseAction.
allows to modify action on X click: activate right tab after closed, or recent tab.
Title: Re: ATTabs
Post by: kapibara on September 14, 2018, 11:18:04 pm
You are doing a really good job. Thanks!
Title: Re: ATTabs
Post by: AlexTP on October 30, 2018, 10:49:56 am

2018.10.30
+ add: animations on tab add/close, which are controlled by new props:
    OptAnimationEnabled
    OptAnimationStepVert
    OptAnimationStepHorz
    OptAnimationPause
   
animation is off by default, because it slows down CudaText and other apps maybe.
Title: Re: ATTabs
Post by: AlexTP on December 06, 2018, 04:07:14 pm
2018.12.06
+ add: property OptTruncateCaption (truncate caption with ... on left/ on right/ in the middle)
Title: Re: ATTabs
Post by: AlexTP on December 07, 2018, 07:30:48 am
2018.12.07
+ add: property OptShowFlatSepar
Title: Re: ATTabs
Post by: AlexTP on December 11, 2018, 06:46:01 pm

2018.12.11
- fix: clicking on X area with hidden X button must not close tab
- fix: painting of tab underlines with OptShowAngled
- fix: compiling in Delphi

2018.12.10
- fix: context menu on macOS

2018.12.08
+ add: property ColorSeparator
Title: Re: ATTabs
Post by: AlexTP on December 17, 2018, 10:21:19 am
Updates

2018.12.17
+ add: prop OptHintForX
+ add: prop OptHintForPlus
+ add: prop OptHintForArrowLeft
+ add: prop OptHintForArrowRight
+ add: prop OptHintForArrowDown
+ add: prop OptHintForUser0...4

2018.12.16
+ add: prop OptShowXButtons has new enum value: "show for active + mouseover tabs"

2018.12.12
- fix: OnDragDrop, OnDragOver did not work
Title: Re: ATTabs
Post by: gorkamorka on December 19, 2018, 11:29:30 pm
Nice, thank you !
Title: Re: ATTabs
Post by: AlexTP on December 26, 2018, 04:49:00 pm
Update

2018.12.26
+ add: drag-drop now works in Delphi (tested on D7)
- workaround for Lazarus drag-drop: it starts too early, so simple click on x icon shows drag-drop mark

2018.12.23
- fix: calculate index of mouse-over tab also on each Paint, because user can add/del tabs by keyboard
Title: Re: ATTabs
Post by: AlexTP on February 22, 2019, 09:53:08 am

2019.02.17
+ add: option for rounded X mark on mouse-over OptShowXRounded

2018.12.28
- fix: flickering of hints when mouse moves over x,<,> buttons
Title: Re: ATTabs
Post by: AlexTP on June 15, 2019, 01:53:15 pm
Quote
2019.06.15
+ add: OptSpaceSeparator

2019.06.14
+ add: OptButtonLayout allows chars "|" (separator) and "_" (space)
+ add: OptButtonSizeSpace
+ add: OptButtonSizeSeparator
+ add: TabMenuExternal (TPopupMenu)
* removed support for TNT Controls

2019.06.07
+ add: ParentColor

2019.06.06
+ add: property OptShowFlatMouseOver
+ add: changes in design-time are applied immediately
Title: Re: ATTabs
Post by: snorkel on December 21, 2019, 07:00:21 pm
Anyone know how to set the inactive tab font color?  I can't seem to find a property for that.
Using the latest version from the repository.
Title: Re: ATTabs
Post by: AlexTP on December 25, 2019, 07:12:21 am
@snorkel
Seems it's possible, did you try these props?

Code: Pascal  [Select][+][-]
  1.     property ColorFont: TColor read FColorFont write FColorFont default _InitTabColorFont;
  2.     property ColorFontModified: TColor read FColorFontModified write FColorFontModified default _InitTabColorFontModified;
  3.     property ColorFontActive: TColor read FColorFontActive write FColorFontActive default _InitTabColorFontActive;
  4.     property ColorFontHot: TColor read FColorFontHot write FColorFontHot default _InitTabColorFontHot;
  5.  

Proof
Title: Re: ATTabs
Post by: sash on December 25, 2019, 01:05:08 pm
Code: Pascal  [Select][+][-]
  1.     property ColorFont: TColor read FColorFont write FColorFont default _InitTabColorFont;
  2.     property ColorFontModified: TColor read FColorFontModified write FColorFontModified default _InitTabColorFontModified;
  3.     property ColorFontActive: TColor read FColorFontActive write FColorFontActive default _InitTabColorFontActive;
  4.     property ColorFontHot: TColor read FColorFontHot write FColorFontHot default _InitTabColorFontHot;
  5.  


With all respect, but IMO such properties (of type TColor) should be named something like ModifiedFontColor, because to me (I may be wrong, English is not my native language) "ColorFontModified" sounds like "Colored Font has been Modified".
Title: Re: ATTabs
Post by: AlexTP on December 26, 2019, 09:27:30 am
I like nice prefixes, so I made Color* prefixes, like for example I did in ATSynEdit - OptNNNNNN.
Title: Re: ATTabs
Post by: aducom on December 26, 2019, 10:22:53 am
And the properties come together in the property editor, instead of scrolling around to get them set.
Title: Re: ATTabs
Post by: Ericktux on November 06, 2020, 04:43:08 pm
hello friend, excellent job.  :)
Please where can I find the latest version with examples.

Cheers.
Title: Re: ATTabs
Post by: AlexTP on November 06, 2020, 05:17:21 pm
Please see
https://wiki.freepascal.org/ATTabs
Title: Re: ATTabs
Post by: Ericktux on November 07, 2020, 02:36:47 am
Thank you very much friend, I am going to review it and try it and any questions I will ask for your help.

Cheers.  :)
Title: ATTAbs problem with high res screen
Post by: bobonwhidbey on October 29, 2021, 09:19:28 pm
My app is using the latest version of ATTabs - just downloaded today from GitHub. It is working beautifully on most computers. One user has a laptop with 3840 x 2400 screen resolution and the font used to print the tabs is gigantic, and unreadable. See the attached picture. I'm guessing this has something to do with the screen resolution.

Title: Re: ATTAbs problem with high res screen
Post by: AlexTP on October 29, 2021, 10:31:56 pm
Hello.
Did you try to change TFont.PixelsPerInch, for the Font property? ATTabs has the Font property.
Title: Re: ATTAbs problem with high res screen
Post by: bobonwhidbey on October 29, 2021, 11:07:18 pm
This didn't change anything. I put this in the FormCreate procedure.

  Tab1.Font.PixelsPerInch := Screen.PixelsPerInch;
Title: Re: ATTAbs problem with high res screen
Post by: AlexTP on October 30, 2021, 12:23:35 am
You have the Font prop, and can change Font.Size and Font.PixelsPerInch (set Size to smaller value, set P.P.I. to lower value).

If you still cannot fix it, give me the compilable demo. Very simple demo.
Title: Re: ATTAbs problem with high res screen
Post by: bobonwhidbey on October 30, 2021, 12:52:08 am
Do you mean use this approach in FormCreate to minimize the size?

  Tab1.Font.PixelsPerInch := Screen.PixelsPerInch;
  Tab1.Font.Size := Round(Tab1.Font.Size*96/Screen.PixelsPerInch);
Title: Re: ATTAbs problem with high res screen
Post by: AlexTP on October 30, 2021, 12:54:05 am
Smth like this, yes. maybe ATTabs indeed has the issue, maybe it over-scales the text? I need the demo to see it.
Title: Re: ATTAbs problem with high res screen
Post by: bobonwhidbey on October 30, 2021, 12:58:40 am
My user with the hi-res laptop is 8 time zones away, and I don't have the ability to test on such a high res monitor. I'll get back as soon as I can.
TinyPortal © 2005-2018