ne0bot / delphi-chrome-tabs Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/delphi-chrome-tabs
License: Other
Automatically exported from code.google.com/p/delphi-chrome-tabs
License: Other
Range check error in PaintControlToCanvas:
SrcControl.Parent.Perform(WM_ERASEBKGND, DC, 0);
SrcControl.Parent.Perform(WM_PAINT, DC, 0);
when DC more than integer.
Fixit:
SrcControl.Parent.Perform(WM_ERASEBKGND, integer(DC), 0);
SrcControl.Parent.Perform(WM_PAINT, integer(DC), 0);
Original issue reported on code.google.com by [email protected]
on 10 Sep 2014 at 3:57
I have noticed 2 issues with your compiled demo.
1. The top row tabs were not visible when I ran your pre-compiled XE2.exe but
when I re-compiled the demo (under Delphi 7) - they appeared.
2. The "first time" the tabs are displayed, the render is incorrect but moving
the mouse over the first or the second tab and waiting a few seconds corrects
it - see attached picture.
How easy would it be to implement a descendant of this as a page control, ie.
Pages[], ActivePage, SelectNextPage, etc.
Great work BTW!
Original issue reported on code.google.com by [email protected]
on 15 Mar 2013 at 6:47
Hi,
I stumbled on an access violation error. I can give you the full stack trace if
you would like but this is the top:
Exception stack
Stack list, generated 6/21/2014 2:55:50 AM
[005A6549] ChromeTabsControls.TChromeTabControl.GetTabWidthByContent$qqrv (Line
891, "ChromeTabsControls.pas" + 1)
------------------------------------------------------------------------------
Call stack for main thread
Stack list, generated 6/21/2014 2:55:50 AM
[77A60C42]{ntdll.dll } ZwGetContextThread
I was able to recreate it in your demo application by setting the tabs to size
by content and placing two windows with the top of the active one just slightly
below the top of the inactive one and then attempting to drag up one of the
tabs. I haven't spent much time trying to diagnose this but I'm looking so if I
find anything before you respond I'll post back but visually it appears because
the two tab controls are so close to each other it ends up trying to place the
tab on both tab docks at the same time.
Thanks,
Chris
Original issue reported on code.google.com by [email protected]
on 21 Jun 2014 at 7:00
What steps will reproduce the problem?
1. Add a TImageList with one 32bits bitmap
2. Assign imageList to ChromeTabs component
3. Add a tab with imageindex = 0
What is the expected output? What do you see instead?
- expected: tab draw all colors of image from ImageList
- got: a poor quality icon converted from the bitmap
What version of the product are you using? On what operating system?
1.3 + Delphi 7
Please provide any additional information below.
Replace the code with:
uses
pngImage; // add too your project -> http://pngdelphi.sourceforge.net/
function ImageListToTGPImage(ImageList: TCustomImageList; ImageIndex: Integer):
TGPImage;
var
bitmap: TBitmap;
png: TPNGObject;
stream: TStream;
begin
stream := TMemoryStream.Create;
try
png := TPNGObject.Create;
try
bitmap := TBitmap.Create;
try
ImageList.GetBitmap(ImageIndex, bitmap);
bitmap.Transparent := True;
png.Assign(bitmap);
finally
bitmap.Free;
end;
png.SaveToStream(stream);
stream.Position := 0;
finally
png.Free;
end;
except
stream.Free;
raise;
end;
Result := TGPBitmap.Create(TStreamAdapter.Create(stream, soOwned));
end;
Original issue reported on code.google.com by [email protected]
on 28 Aug 2013 at 12:33
It would be great to have such an implementation works on Lazarus
(multi-platform).
Can you convert it ? :P
Original issue reported on code.google.com by [email protected]
on 15 Feb 2013 at 1:19
Hi,
First off I want to see this is an excellent library. Now I have a quick
question. It seems as though setting the tabcontrol property might be the way
to create a new window and move the tab over to the chrometabs in the new
window but it doesn't work. I've toyed with the idea of simply creating a new
tab and going that route but I figure there must be a more efficient method of
doing it.
Thanks,
Chris.
Original issue reported on code.google.com by [email protected]
on 18 Jun 2014 at 4:24
If I change the look and feel of the Add Button at run time to specify new
colors, the button does not repaint with the new colors after calling the
TChromeTab controls Invalidate() procedure (changing other LookAndFeel colors
and invalidating the control works as expected).
The button does change to the new colors after a mouse over or click event, but
not programatically via Invalidate().
My use case is to update the control colors on Windows 8 and above to match the
UI style when a model window is displayed over a TChromeTabsGlassForm
containing a tab bar, so I am relying on Invalidate the trigger the repaint and
not mouse events.
Have I missed something or is this a small bug in the control?
Original issue reported on code.google.com by [email protected]
on 13 Nov 2014 at 5:23
Win7/8
This is because the client part of the window takes up all the space. Windows
thinks that running a full screen application and do not give the taskbar pop
up when her mouse pointer.
My fix:
procedure TChromeTabsGlassForm.WMNCCalcSize(var Message: TWMNCCalcSize);
begin
if UseCustomFrame then
begin
if WindowState = wsMaximized then
Inc(Message.CalcSize_Params.rgrc[0].Left, FWndFrameSize + 1)
else
Inc(Message.CalcSize_Params.rgrc[0].Left, FWndFrameSize);
Dec(Message.CalcSize_Params.rgrc[0].Right, FWndFrameSize);
Dec(Message.CalcSize_Params.rgrc[0].Bottom, FWndFrameSize);
end
else
inherited;
end;
Original issue reported on code.google.com by [email protected]
on 21 Aug 2013 at 6:31
Using the demo application highlights this problem quite well:
1) Run the demo app and keep clicking on 'new tab' button on the TChromeTabs
control.
2) After a number of new tabs, all you will see will be curved profiles as they
will no more display any captions.
While this may be normal, I doubt it would be the desired one.
3) Now, select any of those tabs, all you will see will be close buttons. Which
means, if you click, that tab will be destroyed.
I don't think this is what TChromeTabs should do.
IMO, TChromeTabs at least needs a property for minimum tab width --beyond which
it should not get any smaller-- and some kind of scrolling so that if the total
width of all tabs exceeds that TChromeTabs width, the user should be able to
get to the invisible/out-of-sight tabs.
Ideally, I should be able to do this, but I am totally hopeless with GUI stuff;
as a result I am having to report it as a feature request (or a bug).
Original issue reported on code.google.com by [email protected]
on 13 Jan 2013 at 8:55
Hello,
When I drag a tab and drop it into the MainForm it will be closed. But as you
know in the Google chrome,by doing this, a new window will be shown for that
tab.
Original issue reported on code.google.com by [email protected]
on 19 Apr 2013 at 2:33
What steps will reproduce the problem?
1. Set the "Images" property to ImageList with png images (set Alpha channel
like XP)
2. Create Tab and set ImageIndex to 1
3. Under WindowsXP i see white space but not a picture.
Fix:
unit ChromeTabsUtils;
function IconToGPImage(Icon: TIcon): TGPImage;
Result := TGPImage.Create(TStreamAdapter.Create(MemStream));
>>>
Result := TGPImage.Create(TStreamAdapter.Create(MemStream, soOwned));
and delete FreeAndNil(MemStream);
function BitmapToGPBitmap(Bitmap: TBitmap): TGPBitmap;
Result := TGPBitmap.Create(TStreamAdapter.Create(MemStream));
>>>>
Result := TGPBitmap.Create(TStreamAdapter.Create(MemStream, soOwned));
and delete FreeAndNil(MemStream);
PS: tnx for component!
Original issue reported on code.google.com by [email protected]
on 26 Jul 2013 at 10:47
1. Uninitialized IconRect.
2. Wrong behavior, when try to resize form by the upper-left or the upper-right
corner of windows. Windows 8.
Need somth. like
if ClientPos.Y < FWndFrameSize then
begin
if (Message.Result <> HTTOPLEFT) and (Message.Result <> HTTOPRIGHT) then
begin
Message.Result := HTTOP;
end;
end
else
begin
Message.Result := HTCAPTION;
end;
Original issue reported on code.google.com by [email protected]
on 16 Mar 2013 at 3:20
So, the problem is that, what ChromeTabsActiveTabChanging Event works Wrong,
why?
Because ANewTab var contains wrong value.
Try to create an easy project with this TABS, and put this code on this EVENT:
ShowMessage(inttostr(ANewTab.Index));
---
Now, try to create 2 Tabs, then focus on First Tab and close it!
You will get "Argument not in range" error, if try to hide OldTab and show
NewTab, because NewTab contains wrong value.
The code i posted, will show 1 after doing operations, i said, so that will
cause an error, bad error.
ANewTab must be 0, not 1, because Tab With Index 0 is exactly closed and if
ANewTab contains of 1, we trying to show this Tab and we get an Range Error,
because Tab With index 1 doesn't exist as it is!
So in case of that, you need to edit your code and make it work correctly,
because ANewTab must be 0, but not 1.
For maximum understand, what i just said, please, compile or just look at this
code and try to make what i sad about 2 tabs and focusing on first tab with
index 0 and closing it.
Here is the code:
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
System.Generics.Collections, ChromeTabs, ChromeTabsClasses, cefvcl;
type
TForm1 = class(TForm)
ChromeTabs1: TChromeTabs;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ChromeTabs1ButtonAddClick(Sender: TObject;
var Handled: Boolean);
procedure ChromeTabs1ButtonCloseTabClick(Sender: TObject;
ATab: TChromeTab; var Close: Boolean);
procedure ChromeTabs1ActiveTabChanging(Sender: TObject; AOldTab,
ANewTab: TChromeTab; var Allow: Boolean);
private
FBrowsers: TObjectList<TChromium>;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
// create instance of the object list and let it manage
// lifetime of the inserted objects
FBrowsers := TObjectList<TChromium>.Create;
FBrowsers.OwnsObjects := True;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
// release the object list
FBrowsers.Free;
end;
procedure TForm1.ChromeTabs1ButtonAddClick(Sender: TObject;
var Handled: Boolean);
var
ChromiumInstance: TChromium;
begin
// create an instance of the browser component and
// initiliaze its properties - here it's simplified
ChromiumInstance := TChromium.Create(nil);
ChromiumInstance.Parent := Self;
ChromiumInstance.SetBounds(8, 8, 150, 150);
// now add the new browser instance to the collection
FBrowsers.Add(ChromiumInstance);
end;
procedure TForm1.ChromeTabs1ButtonCloseTabClick(Sender: TObject;
ATab: TChromeTab; var Close: Boolean);
begin
// delete the browser instance from the collection; since we've
// assigned True to the OwnsObjects property of the collection,
// we don't need to care of freeing the browser instance
FBrowsers.Delete(ATab.Index);
// allow the tab to close
Close := True;
end;
procedure TForm1.ChromeTabs1ActiveTabChanging(Sender: TObject; AOldTab,
ANewTab: TChromeTab; var Allow: Boolean);
begin
// check if there's an "old tab" and if so, check also if we have its
// index in the range of our collection; if so, then hide the browser
if Assigned(AOldTab) and (AOldTab.Index < FBrowsers.Count) then
FBrowsers[AOldTab.Index].Visible := False;
// and show the activated tab browser
FBrowsers[ANewTab.Index].Visible := True;
end;
end.
REGARDS, Tugalov Abdurahman(nikname Priler).
Original issue reported on code.google.com by [email protected]
on 19 Jul 2013 at 9:22
What steps will reproduce the problem?
1. Set Allow to False in OnActiveTabChanging
2. Try to switch to another tab
3. FModified = False :(
What is the expected output? What do you see instead?
If the handler is forbidden to switch - flag "modified" should remain unchanged.
What version of the product are you using? On what operating system?
1.1
Please provide any additional information below.
In my project i need some animation in inactive tab (background jobs). Now i
use 'Modified' for this.
But, may be this stuff - '{ TODO -cFeature : Tab busy spinners }' would suit me
better?
ps
Tnx for component!
Original issue reported on code.google.com by [email protected]
on 24 Dec 2012 at 8:39
The return value of `timeGetTime` is DWORD. So cast it as Integer might cause a
range check error.
Here is the patch:
procedure TTimerThread.Execute;
var
SleepTime: Integer;
Last: DWORD;
begin
while (FTimer.Continue) and (not Terminated) do
begin
Last := timeGetTime;
try
Synchronize(DoExecute);
except
// Just in case
end;
SleepTime := FTimer.FInterval - Integer(timeGetTime - Last);
if SleepTime < 10 then
SleepTime := 10;
Sleep(SleepTime);
end;
end;
Original issue reported on code.google.com by [email protected]
on 7 Apr 2014 at 4:47
Hi
I needed to have a close button on some tabs but not on others.
I have attached a patch to support this so after you create a tab you can
specify whether it has a close button by setting HasCloseButton to true or
false.
Cheers!
Original issue reported on code.google.com by [email protected]
on 8 Jul 2014 at 4:50
Attachments:
When building the latest TChromeTabs with C++ Builder (XE4),
TChromeTabsGlassForm will cause an access violation due to the protected
virtual function ShowTabsInTitleBar.
:a57b0001
:00662FF3 Vcl::Controls::TControl::Perform(Self=????, Msg=????, WParam=????,
LParam=0)
:006619E7 Vcl::Controls::TControl::SetVisible(Self=????, Value=????)
:00706F4C
Chrometabsglassform::TChromeTabsGlassForm::TChromeTabsGlassForm(Self=:020F7330,
AOwner=:0211E020, ...)
:00402D8D TForm1::TForm1(this=:020F7330, Owner=:0211E020)
:00633EE5 Vcl::Forms::TApplication::CreateForm(Self=:0211E020,
InstanceClass=????, Reference=:0073A8C0)
:00402A9F wWinMain( =:00400000, =NULL, =:00243914, =9)
:006e15a0 ; __wstartup
A solution seems to be to move the definition "function ShowTabsInTitleBar:
Boolean; virtual;" from protected to private in the TChromeTabsGlassForm class
definition. This is likely a C++ Builder specific issue in how Delphi classes
are instantiated.
Original issue reported on code.google.com by [email protected]
on 8 Jul 2014 at 10:01
1. Copy Options as Code and paste to http://www.diffchecker.com/diff original
text window
2. Uncheck 'Display top tabs in the title bar non client area'
3. Copy Options as Code and paste to http://www.diffchecker.com/diff changed
text window
4. Result is exactly the same.
Original issue reported on code.google.com by [email protected]
on 21 Mar 2014 at 12:22
In ChromeTabsClasses.pas we see:
function TChromeTabsList.GetChromeTabInterface: IChromeTabs;
begin
Assert(Supports(Owner, IChromeTabs, Result), 'Collection owner must support IChromeTabInterface');
end;
if compiled with Assertion = false we obtain AV because Assert be exclude/
Original issue reported on code.google.com by [email protected]
on 10 Sep 2014 at 3:23
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.