Code Monkey home page Code Monkey logo

atflatcontrols's People

Contributors

aducom avatar alexey-t avatar srd-software avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atflatcontrols's Issues

Sorry, but error again ...

Checking project dependencies...
Building ATFlatControlsPackage.dproj (Debug, Win32)
[dcc32 Hint] atbuttons.pas(560): H2443 Inline function 'CanvasLine' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] atbuttons.pas(570): H2443 Inline function 'CanvasLine' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] atbuttons.pas(654): H2443 Inline function 'CanvasPaintTriangleDown' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] atbuttons.pas(656): H2443 Inline function 'CanvasPaintTriangleLeft' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] atbuttons.pas(658): H2443 Inline function 'CanvasPaintTriangleRight' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Error] atflatcontrols_separator.pas(32): E2252 Method 'GetItemStr' with identical parameters already exists
[dcc32 Error] atflatcontrols_separator.pas(74): E2004 Identifier redeclared: 'TATStringSeparator.GetItemStr'
[dcc32 Error] atflatcontrols_separator.pas(77): E2251 Ambiguous overloaded call to 'GetItemStr'
atflatcontrols_separator.pas(31): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
atflatcontrols_separator.pas(32): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
[dcc32 Error] atflatcontrols_separator.pas(85): E2251 Ambiguous overloaded call to 'GetItemStr'
atflatcontrols_separator.pas(31): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
atflatcontrols_separator.pas(32): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
[dcc32 Error] atflatcontrols_separator.pas(96): E2251 Ambiguous overloaded call to 'GetItemStr'
atflatcontrols_separator.pas(31): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
atflatcontrols_separator.pas(32): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
[dcc32 Error] atflatcontrols_separator.pas(113): E2251 Ambiguous overloaded call to 'GetItemStr'
atflatcontrols_separator.pas(31): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
atflatcontrols_separator.pas(32): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
[dcc32 Error] atflatcontrols_separator.pas(124): E2251 Ambiguous overloaded call to 'GetItemStr'
atflatcontrols_separator.pas(31): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
atflatcontrols_separator.pas(32): Related method: function TATStringSeparator.GetItemStr(out string): Boolean;
[dcc32 Error] atflatcontrols_separator.pas(126): E2003 Undeclared identifier: 'StrToDWordDef'
[dcc32 Error] atflatcontrols_separator.pas(32): E2065 Unsatisfied forward or external declaration: 'TATStringSeparator.GetItemStr'
[dcc32 Fatal Error] attabs.pas(38): F2063 Could not compile used unit 'ATFlatControls_Separator.pas'
Failed
Elapsed time: 00:00:01.0

ATListbox ShowHorzScrollbar

@srd-software Stan, I just added code for horz scrollbar-- it is

  • ShowHorzScrollbar
  • ScrollHorz is scroll position
  • works for both ThemedScrollbars and not themed
  • OnCalcScrollWidth for virtual mode (virtual is property)

need to check does it compile on Delphi? i am on Linux, lazy to reboot.

SB Theme Question

Hi Alexey,

Here's a question for you. When using the ATscrollbars, anytime we change something visual in the ATScrollBarTheme, we have to "manually" invalidate every atscrollbar on the form to get that change to show up. Can you think of a way to be able to send a message or something that would force all the form atscrollbars to update to a theme change at one time? I'm thinking maybe a private message (not sure how that would work in lazarus), or maybe a theme property of some sort that would react to a mass update call?

TATTabs: Missing Event while reordering Tabs

Hi,

I am looking for an event, that is fired while the user is moving a tab to another position - basically it should fire every time when that little red indicator line changes to another tab position:

image

All events I could find so far are fired only after the user releases the left mouse button.

Little problem again

[dcc32 Error] atstatusbar.pas(901): E2003 Undeclared identifier: 'Move'

function TATStatus.MovePanel(AFromIndex, AToIndex: integer): boolean;
begin
Result:= false;
if AFromIndex=AToIndex then exit;
if not IsIndexOk(AFromIndex) then exit;
if not IsIndexOk(AToIndex) then exit;
FItems.Move(AFromIndex, AToIndex); <--- row 901 !
Invalidate;
Result:= true;
end;

ColorTabActive paint regression

I've noticed a small problem with the painting of the space below tabs. In previous versions of the component the remained space below the tabs is painted with the ColorTabActive color as is the active tab itself.

In the current version this is also the case as long as all tabs fit in the tab control:
SpaceForAll

However, if there is not enough space for the tabs, the ColorTabActive is no longer used:
NotEnoughSpace

Could this be fixed somehow?

Inline title edit

I don't know if this would be too technically challenging, but it would be great, if we can edit the tab title inline as for example Ms OneNote allows. I.e. option when double clicking on the tab an inline text editor shows. Of course this will also need a corresponding event to accept/reject invalid tab names and a method to pragmatically start the inline editor.

Capture

Question about buttons placed on the left side and tabwidth of the leftmost tab after scrolling

I'm using the ATTabs / Lazarus since nearly a year with fun :-)

For a little usage change i did run into the following question (no issue):

I'm using OptVarWidth true, OptTabWidthMinimal := 80,
and now - testing: - the button for tab scrolling as well as the button for tab list both on the left side (OptButtonLayout:= '<> v'):

Is there an already existing capability to define a certain min-width for the (after scrolling:) leftmost appearing tab?
So that we can be avoid to have truncation effects like the two ones shown in the picture?

grafik

Use case would be that the leftmost appearing tab is at least recognizable after scroll.
One might keep in mind that when placing scroll and list buttons both on the left side the user's "operational focus" is surely on the left side.

Memory leak in TATTabs?

Hi Alexey,
I've found a very strange memory leak that I tryed to investigate without success. It seems to be related to the
last version of TATTabs component even if I'm not pretty sure.
However, here you can find a really simple test application that recreates the issue.
This test application creates a TATTabs instance at runtime and shows two buttons that add a simple tab to the component, with and without the memory leak.
I've tested it only under Windows 10 and Lazarus 2.0.8: the components are not installed in the IDE, source code must be available in a folder listed in the source path option of the project.
Thanks for your support and for your powerful and beautiful components,
Domenico

test.zip

Delphi package and ATScrollBar Addition

Alexey, I downloaded the flat controls and went through them to make them compile under Delphi. I was able to do that but it required a LOT of changes to remove references to lazarus related code. For this to really work, it would need your knowledge in order to put the lazarus pieces back in while keeping compile defines for delphi. Some of it I can fix, but there's a few things (especially in the gauge and listview controls) that would be faster for you to convert to delphi (i.e., "RadialPie"). And a few things like csTripleClicks, BorderSpacing and FBorderStyle calls that I keep running into would (I think) be worth converting for delphi-compatible use now and in the future.

Mostly I was/am interested in the atscrollbar control. I had a really old "standalone" version of it (not sure what version or how old it was, but this one had no ATScrollbarTheme stuff in it at all). The current one has a lot of improvements (especially the ATScrollbarTheme stuff which will make it usable in my self-themed apps). I got it working with almost no lazarus issues. I added some code to allow the thumb to have colors for both over and down states and I plan to add the same color states for the arrows.

I uploaded the changed code to: https://github.com/srd-software/ATFlatControls

Would you be interested in looking at all that? If not that's OK, I can just strip the scroll bar out and make it a standalone control for now.

Stan

atScrollBar MouseDragOffset

Alexey,

I've put together several test apps to test the atScrollBar. I've used a trichedit, a tmemo, and a component I use called PlusMemo. For each one I set the atScrollbar.MinSizeOfThumb to "24". In every case, when scrolling a large file (say, 800+ lines) vertically, when the thumb hits the bottom of the scrollbar, you have to keep the mouse down and keep pulling down in order to get the file contents fully scrolled to the bottom. If I set atScrollbar.MinSizeOfThumb to "4" (default), it seems to work OK.

I think there's something in the MouseDown code and FMouseDragOffset var:

if IsHorz then
    FMouseDragOffset:= X-FRectThumb.Left
  else
    FMouseDragOffset:= Y-FRectThumb.Top;

It looks like the FMouseDragOffset is not taking the bottom arrowrect size into account, but only with large files loaded. With smaller files (say < 100 lines) it's OK.

Let me know if this makes any sense to you!

Stan

Scroll tabs using mouse wheel

Do you think it would be easy to add a scrolling of the tabs via the mouse wheel like in Firefox? It will make navigating when there are many tabs much easier and faster for users.

ATTabs: use bigger internal bitmap buffer

internal bitmap buffer must be scaled. e.g. 5x times.
we paint to this bitmap with scale=5.
we can paint triangles very fast there. and circles. w/o smoothing in temp bitmaps.
then we move bitmap to real canvas to normal small size.

ATListBox variable item heights, and InflateRect

Hi Alexey, Couple of questions for you.

1: I have a simple owner-drawn atlistbox. I have one item that I need to be a different height than all the others. How do you set that?

2: I got the InflateRect(r, -1,-1) working, so just the item height question!

Thanks Alexy.

Prob with DragDrop (unexpected exchange of tabs)?

I'm using attabs with Lazarus 2.2.2 / Windows x64 since some time as a happy user. However from time to time i noticed having my tabs not being placed there where i did expect them to be.

Took a close look on it and suspected at least an issue with unintended resp. unexpected drag&drop.
DragMode is dmAutomatic, and i don't intend to change this.

I tried to replicate it, and please see the following scenario:

Let's have: Tab A - Tab B - Tab C - Tab D - Tab E.
And now:

  • Click Tab B. Tab B is selected.
  • Right click on Tab C. So that the tab's context menu does appear. But do nothing with this menu itself.
  • Instead of that: click onto Tab E.

Now my tab order is:
Tab A - Tab B - Tab E - Tab C - Tab D // Tab E is selected, but does appear at an unexpected place

So, when clicking onto Tab E, it was moved unintendedly after Tab B, replacing Tab C where the right click / context menu had happened.
Before: Tab A - Tab B - Tab C - Tab D - Tab E
--- Select Tab B, right click Tab C, click Tab E ---
After: Tab A - Tab B - Tab E - Tab C - Tab D

Expected behaviour: when clicking Tab E, the tab order does not change.

Might it be an user app error, or rather an attabs issue (that automatic context menu initiates a drag)?

At least, if i set (in attabs.pas) a breakpoint on "BeginDrag", this is not entered at tab click,
but it will be entered at tab click when just before the context menu had been opened. Why that?

Add. info: if i assign not context menu to the right click, no irregularities happen.
Using tht context menu: if i remove any action from the menu item, the issue persists.

Lazarus Demos

Probably should look at all Lazarus demos to ensure they are working correctly. I can look at them if needed.

Font scaling correction

It looks like we need a small font scalling correction in order the tabs font to be scaled properly when the control is moved between monitors with different DPI:

C.Font.Size:= DoScaleFont(C.Font.Size);

should be

C.Font.Height:= DoScaleFont(C.Font.Height);

Size is in points, Height is in pixels, so we need to use Height here. Currently the tab text is truncated if the control is moved to a monitor with different DPI.

Suggestions for scrollbar

Hi Alexey,

I am still working with the scrollbar stuff. I have a couple of suggestions for when you have time to review.

One is Decor3D. I'll add an animated gif to demo below but the idea is to give the thumb grippys a 3D look when desired. Mostly just a visual enhancement, but this can also be of help if they are changing color schemes on the fly as they might "lose" the grippys depending on the color used. If they are "3D" then the app doesn't have to "worry" as much about the color settings.

Second, I added a ThumbMarkerDecorSpace to the SB theme. It lets the user put more space between the grippy lines.

Here's a demo that I hope explains these items. NOTE: Please CLICK on the gif below to see it in correct resolution (it looks bad in the github browser image below!) Normally this is not an issue but I want you to see it as it really looks...

ss3

IsTabVisible/MakeTabVisible issue

It seems that there is some bug in IsTabVisible and MakeTabVisible methods.

I have a tab control with many tabs. When the app starts, I for example set the last tab active. It is selected properly, but it is not visible (i.e. the tabs control is not scrolled). So I try to use the following code to make it visible:

if(!ATTabs1->IsTabVisible(tabs_->TabIndex))
{
  ATTabs1->MakeVisible(tabs_->TabIndex);
}

In my app this call to IsTabVisible returns true even though the tab is not currently visible.

I've also created a demo where there is nothing else except a tab control and many tabs. There the IsTabVisible correctly detects that the active tab is not visible, however MakeVisible does nothing..

In both cases I have only the following options set:

    OptTabWidthMinimal = 80
    OptShowXButtons = atbxShowNone
    OptScalePercents = 200;

Delphi Package Functionality

I have a couple of things (delphi side) that, so far, I can't figure out:

  • atButtons: Added the delphi mouse enter/leave code. Works OK if button is not flat, but if it's flat, background highlights correctly on enter but never goes back on leave.
  • atListbox: Scrolling is better, but listbox does not respond to keyup or keydown. I can select items OK but can't use arrow keys.

This is for when we get the overall new stuff uploaded.

Review TMemo Demo

Alexey, when time permits, I have a demo for a TMemo using the ATscrollbar. It will show how to:

  • Use a custom ATscrollbar with a TMemo
  • Change Font (size, style, allows both proportional and monospaced tests)
  • Change WordWrap
  • How to scroll the memo from the custom ATscrollbar
  • How to scroll the ATscrollbar from the memo
  • Turn both system and custom scrollbars on at the same time for comparison
  • Simple color theme (regular and dark)
  • File drop to TMemo
  • WheelScroll TMemo and ATScrollbar

Image36

I think the vertical stuff is OK (memo controls sb; sb controls memo), and the horizontal seems OK (sb controls memo). But you might check what I've done for horizontal memo controls sb. There's not really a good way that I can find to get the memo horizontal scroll info over to the sb but I did the best I could.

I think this demo will be very useful as there are a lot of links when searching for this kind of thing but very little that helps much. Searches such as: scroll tmemo, tmemo custom scrollbar, how to scroll tmemo when its scrollbars are hidden, etc.

Like I say, I need something like this for reference anyway so if you decide not to use it that's OK.

onData event for TATListBox

When VirtualMode is set to True the DoDefaultDrawItem is writing the indexes for the items
SLine:= '('+IntToStr(AIndex)+')';
However this is not very useful in case you want to show some meaningful data.
If onData event is present it can take the proper text.

if Assigned(fOnData) then
    fOnData(Self, aIndex, SLine)
  else
  if (AIndex>=0) and (AIndex<FList.Count) then
    SLine:= FList[AIndex]
  else
    SLine:= '('+IntToStr(AIndex)+')'; 

I see that the custom draw can do the trick, but it is overhead, cause most of the time when you are in Virtual Mode you don't want to custom draw the control, but you always want to specify the Lines

Sublime way to paint tabs

@srd-software I want to get prototype of painting tabs like Sublime Text (ST) does. pls download it. open file 'Theme - Default.sublime-package'. (On Linux: /opt/sublime_text/Packages).
see PNG pics inside this ZIP file:

  • mask for entire tab
  • mask for top edge (maybe for user colored tabs?)
  • shadow
  • border above tab

now we need the prototype which takes similar png's and paints nice tab using them. tab must be colored with any user-defined color. (problem: I dunno how to mix the colored rectangle + mask, I dunno how ST makes nice gray borders).

for me, it is the better way than our themes.

Can't compile in Delphi 10.2

Hi,

I'm trying to compile/install into Delphi 10.2
I get the following errors:

[dcc32 Error] atlistbox.pas(488): E2010 Incompatible types: 'TRect' and 'Integer'
[dcc32 Error] atlistbox.pas(488): E2034 Too many actual parameters
[dcc32 Error] atlistbox.pas(559): E2010 Incompatible types: 'TRect' and 'Integer'
[dcc32 Error] atlistbox.pas(559): E2034 Too many actual parameters
[dcc32 Fatal Error] atflatcontrols_register.pas(14): F2063 Could not compile used unit 'atlistbox.pas'

I'm using the latest source

RadialPie dont work in Delphi version

ATgauge

    {$ifdef FPC}
    C.RadialPie(r2.Left, r2.Top, r2.Right, r2.Bottom,
      16*90, //starting angle: 90 deg
      -Round(16*Alfa) //pie angle: -Alfa deg
     );
    {$endif}

ATTABS new version cursor issue

Hi Alexey,

I had a problem with the new version of ATTABS. When I would left click a tab to select it, it would immediately show the drag cursor. It was doing this when I was not dragging which is not the desired behavior.

I found the problem at line 2979 in attabs.pas:

This:

  // LCL dragging with DragMode=automatic is started too early.
  // so use DragMode=manual and DragStart.
  if OptMouseDragEnabled and FMouseDown and (FMouseDownButton=mbLeft) and not _IsDrag then
  begin
    BeginDrag(false, Mouse.DragThreshold);
    Screen.Cursor:= crDrag; //needed for Lazarus, when dragging tab below the control to another ATTabs
    Exit
  end;

Needs to be this:

  // LCL dragging with DragMode=automatic is started too early.
  // so use DragMode=manual and DragStart.
  if OptMouseDragEnabled and FMouseDown and (FMouseDownButton=mbLeft) and not _IsDrag then
  begin
    BeginDrag(false, Mouse.DragThreshold);
    {$ifdef FPC}
    Screen.Cursor:= crDrag; //needed for Lazarus, when dragging tab below the control to another ATTabs
    {$endif}
    Exit
  end;

Rather than doing the whole repository copy/fix/upload thing I was hoping just this detail would be enough for you this time!

Thanks Alexey

Stan

ATListBox Scroll Issue

OK, one more thing on the ATlistbox. I have it aligned alClient on a panel. The panel is just "floating" it's not aligned to anything. I have both scroll style properties set to alssHide. But when I show the panel in the app, it looked like the image below when it was aligned client. Note the gray box at the bottom. That's because the list decided to scroll itself up for some reason. The panel height is set to exactly the height of it's contents, but I can set the height larger than needed but it still has the issue. There should be no scrollbars or any scrolling going on

I could use the mouse wheel to scroll it back down but I don't want to have to do that! The rectangle at the top is a label aligned top, the ATlistbox is aligned client. The arrow points to the problem.

image

I could align it to none and then set all the sizes but it seemed like that shouldn't be needed. Here's what it should look like:

image

I finally added this to line 376 of my atlistbox.pas file:

  if (not NeedVertBar) then
    FItemTop := 0;

image

That has fixed it but as before, I'm not sure that's the best fix or the best place for it. When you have time could you look at it and see what you think?

Thanks Alexey.

TATabs generates ontabclick event before initialization of TForm

I'm not sure if this is intentional or a bug. In Lazarus all components are created and then the TForm OnCreate get's fired. In the TForm OnCreate and/or OnShow custom components are useually being created and initialized.
If you change a tab and bind this to an event then you might need to (re)initialize things. That brings issues as the ontabclick event is triggered even before the TForm OnCreate. So you cannot access custom created variables that will be created in the tform.oncreate like tlists, tstringlists etc.
Of course, there are always ways to solve issues, but I thought I should mention this.

Scrollbar.Theme

Example of set before I show the ATLBMisspelled ATlistbox:
ATLBMisspelled.Theme := @ATFlatThemeEx1; //works
ATLBMisspelled.Scrollbar.Theme := @ATSBThemeEx1; //doesn't work, scrollbars don't show

i cannot guess why this dont work, so give the example project which i can edit/fix.
how "scrollbars don't show"?? i don't understand...

If I set any ATlist.Scrollbar.Theme to my new scrollbar theme record, they simply fail to show up in that list. If I take that out and don't assign the list's ATlist.Scrollbar.Theme to anything, they show again.

Drag/drop from other controls not working

I've just discovered an issue. It is no longer possible to drag items from other controls to the ATTabs control. We use that to allow users to automatically switch between tabs when dragging other items from our UI.

I think that the dragging is disabled here (my tests show that it works in 2021.03.05, but not since 2021.04.01):
b3ebae4

Is is possible to enabled it again?

Atlistbox question

Hi Alexey,

Couple of things on the atlistbox. I have one set up as ownerdraw with VirtualMode = false and enough items to activate a scrollbar. The problem I'm having is if I turn HotTrack on, I get a lot of flicker in the built-in scrollbar when mousing over the items (if you move over them slowly it looks OK, but if the mouse is moving medium to fast speed you see it). The only thing I've found that helps (but doesn't seem to eliminate it entirely) is in MouseMove by changing Invalidate to Refresh:

    if FHotTrackIndex<>NewIndex then
    begin
      FHotTrackIndex:= NewIndex;
      Refresh; //helps but can still get a little flickering
      //Invalidate;
    end;

I doubt that's the real answer. Might be something in the erase background message but I can't figure it out.

Second issue is if I set my atlistbox1.scrollbar.width from my app's code (i.e., in form create), the width doesn't change. I have to put the width change into something like my app's idle or listbox drawitem code to get it to change. Note that I've commented this out while testing the flicker problem above, so this is not the problem on that issue).

I can always replace the built-in scrollbar with an external one, or turn off HotTrack but those options defeat useful things about using the listbox as intended!

Any ideas welcomed.

Stan

ATTabs Issue on Lazarus Linux GTK2 close button requires two clicks

Hi,
Having a issue with ATTabs on Linux GTk2 (Laz 2.06) When I add a tab from a popup menu from a tvirtualstringtree the close button on the tab does nothing on the first click and on the second click it closes and in the terminal this error pops up:
GLib-GObject-WARNING **: 11:15:36.741: ../glib/gobject/gsignal.c:1206: no emission of signal "button-release-event" to stop for instance '0x208b5b0'
If I right click on the tab and use the popup menu I call to close the tab this error does not occur.
Also if I spawn the tab from a button on a toolbar it closes on the first click but that error still shows in the terminal. I am using the latest version of Attabs as of a day ago.
This does not happen in windows and I have not been able to test in QT5
I am using tactions to add the tab and if I call the action from the tvirtualstringtrees double click event it also closes on the first click, it's only if the addtab is called from the context of a popup menu. I also noticed if I click anywhere on the form that is hosted in the tab then click the close button it closes.

Sample Code ?

Hi.

Do you have a sample where the tabs work like a TPageControl Where it will show the content of the tab yu click on? All the sample the content stays the same no matter what tab you click on.

Thanks.

Feature request: ATListbox: expose OnOwnerDraw scrollbars

The ATScrollbar allows painting the canvas which is great if you want to make a dark-theme. The sample shows how to do this. Although I don't like the use of characters like ^v<> it appears to work quite well. However the ATScrollbar is also used in the ATListbox, which is great. However the onownerdraw of the scrollbar is not exposed. There are virtually two scrollbars involved (horizontal and vertical) but actually I think that exposing one event onOwnerDrawScrollBar that points to the FScrollbar. I don't mind looking into this if you think this is a good idea, because there are other options, like adding the event by code, or perhaps the theming options in the component. To be honest I couldn't figure out how this supposed to work as I think it has to do with OS theming, but under Lazarus I couldn't get the manifest idea to work well. Other option could be a separate component to allow theming, and actually I think that might be a better way. What do you think?

ATTABS new version ellipse issue

Hi Alexey,

I have a strange issue with the latest version of ATTABS. If I have tabs with no ellipsis in them the tab captions are OK. However, if the tab captions are longer than will fit in the tabs, I get odd characters where I should be getting ellipsis (should be these: ... ). I'll put in some screen shots below. The first one is how it should look, the second one is what I'm now getting. As far as I can see in my code, I'm not drawing any text myself, it's all in the tab control. If I maximize the app so some of the tabs no longer need ellipsis, those tabs are then OK until I restore the app to normal size. I have no idea what the problem is or even where to start looking!

CORRECT:

image

The one below is INCORRECT and what I get with the latest version:

image

DirectJumpOnClick

Alexey,

I'm having trouble with the atscrollbar DirectJumpOnClick. If true, it works if I click in the PageUp rect. But if I click in the PageDown rect the scroll always jumps to the bottom (in a vertical SB; or all the way to the right in a horizontal SB). Assuming PageUp and PageDown should work in a similar way, the problem seems to be in the code below. I played with it a little but I'm not good with the relational math stuff like you are so I was not able to get it to work.

      if FTheme^.DirectJumpOnClickPageUpDown then
      begin
        Position:= Math.Min(FMax-FPageSize,
                   Math.Max(FMin,
                   CoordToPos(X, Y)));
      end

ss3

Thanks Alexey!

Middle click and drag issue

Clicking on a tab with the middle mouse button starts a tab drag, but that drag never finishes. So you are stuck in a drag mode forever.

IMO it shouldn't start drag at all..

Variable width Tabs with MultiLine for ATTabs

The file I used in Delphi was CCR.TabControl.pas. I've changed the file EXT so I could send it to you.
CCR.TabControlEx.txt

The really nice feature: when a new line is needed not just one tab flops down to the 2nd line. I attached an example with one screen a little smaller than the other.

tab big
tab small

TabBorder width problem with High DPI

The HighDPI support is excellent, but there is a problem with tab border width. It is not scaled, but is always 1px (the routines use DrawLine function, which does not take width as param, but uses hard-coded 1px width).

Can this be fixed?

ATTabs - Slight Rounding

Alexey

Thank you for your excellent controls, I appreciate your work.

Has there been a subtle change to how tabs are drawn?
I used to be able to get perfectly square corners by setting OptSpaceSide to 0,
but having updated to 2.1.0.0 using Online Package Manager it
appears to my (old) eyes that they now have a very slight rounding.

Hope I am not wasting your time.

Regards

Ray

How put a form insde tTab or controls like tpage

Hello how is possible to put form inside TTab or Controls like tpage, for example on ABM of table if i create a form with control how i put that inside ttab, on examples you i don't see some like add a tab or page the way can add controls there...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.