plashenkov / tbx Goto Github PK
View Code? Open in Web Editor NEWThemeable toolbars, menus and controls for Delphi
License: MIT License
Themeable toolbars, menus and controls for Delphi
License: MIT License
Hi,
Does TBX use the VCL styles available in XE8? I tried changing the Appearance of the application to "Metropolis UI Green" and the TBX menus and buttons styles did not change?
Thanks,
Eric
I found TTBXColorItem image size is fixed to 16.
function TTBXColorItemViewer.GetImageSize: TSize;
begin
if IsToolbarStyle then
begin
Result.CX := 12;
Result.CY := 12;
end
begin
else
Result.CX := 16;
Result.CY := 16;
end;
end;
If you mix use TTBXColorItem and TTBXItem, and TTBXToolbar.Images is not a 16*16 icons.
It really ugly in some themes(TTBXToolbar.Images is 24 * 24).
Can you make TTBXColorItem image size can be set from a property or auto adapt TTBXToolbar.Images size.
TB2Item.HPP is generated, after patching it has stuct TTBPopupPositionRec.
But C++ compiler complains:
**
[bcc32 Error] TB2Item.hpp(157): E2019 'TTBPopupPositionRec:: :: :: ()' cannot be declared in an anonymous union
TB2Item.hpp(135): class TTBPopupPositionRec::
**
Here it is generated struct:
struct DECLSPEC_DRECORD TTBPopupPositionRec
{
union
{
struct
{
bool HorzHideSeparators;
int HorzWrapOffset;
TTBOrientation PopupOrientation;
};
struct
{
bool PositionAsSubmenu;
TTBPopupAlignment Alignment;
bool Opposite;
System::Types::TRect MonitorRect;
System::Types::TRect ParentItemRect;
int NCSizeX;
int NCSizeY;
int X;
int Y;
int W;
int H;
Tb2anim::TTBAnimationDirection AnimDir;
bool PlaySound;
};
};
};
Current version is ugly in 4k display.
I do have various toolbars & tool-windows with different heights.
The question or suggestion is to have on the current Dock and on each ROW various toolbar heights without automatic toolbar/tool-window enlarging (in height).
Example:
If both are on Dock raw 0: all toolbar heights are altered to 30.
If each toolbar is on a different raw: each toolbar has its own height as by design as 20/30
In other words how to have different toolbar heights (without automatic resize) at a given raw...
Is there any??
I have installed TBX under Delphi7. When starting an older project I get an error message like "Index of Theme Default" not found.
Also when compiling packages I got an error message Theme % not found.
I installed everything according to the instructions.
Could you update install package for Delphi10, 10.2, 10.3?
Compiliation Error:
[dcc32 Error] TB2Reg.pas(281): E2003 Undeclared identifier: 'RegisterActions'
Solution:
commented the following line:
{$IFDEF JR_D4} RegisterActions('', [TTBEditAction], nil); {$ENDIF}
Click on Combox Item/Viewer fires a change event...
There seams also an issue of not loading the last edit value
Hp
Issue imported from Google Code:
https://code.google.com/p/tbxlib/issues/detail?id=3
Reported by bernd.ott [at] quantendrehung.de, Jan 30, 2013
You need at least two monitors.
put the primary monitor on left side.
the secondary monitor hast to be on right side and in a higher position in windows.
see screenshot
use an mdi application.
put tbxmdi on form.
put mainform on secondary monitor in maximized mode.
put mdichild in max. mode.
click mdi close button.
you get an exception:
Exception class: ERangeError
Exception address: 0064F929
Stack list, generated 30.01.2013 15:38:01
[0064F924] TBXMDI.TTBXMDIButtonsItem.ItemClick + $4C
[004033BE] System.ErrorAt + $16
[0064F924] TBXMDI.TTBXMDIButtonsItem.ItemClick + $4C
[005B1CC8] TB2Item.TTBCustomItem.Click + $A8
[005B1BA7] TB2Item.TTBCustomItem.ClickWndProc + $BB
[004303AC] Classes.StdWndProc + $14
[0049093C] Forms.TApplication.ProcessMessage + $FC
[00490976] Forms.TApplication.HandleMessage + $A
[00490C6B] Forms.TApplication.Run + $B3
sorry, component is ttbxmdihandler
file tbxmdi fails at:
SendMessage(ChildForm.Handle, WM_SYSCOMMAND, Cmd, GetMessagePos);
GetMessagePos delivers a negative position.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646360(v=vs.85).aspx
maybe that parameter can be 0 or -1. but that has to be testet
My suggest patch:
Index: TBXMDI.pas
===================================================================
--- TBXMDI.pas (revision 19)
+++ TBXMDI.pas (working copy)
@@ -286,7 +286,7 @@
begin
Form := Application.MainForm.ActiveMDIChild;
if Assigned(Form) then
- SendMessage(Form.Handle, WM_SYSCOMMAND, TTBXCustomItem(Sender).Tag, GetMessagePos);
+ SendMessage(Form.Handle, WM_SYSCOMMAND, TTBXCustomItem(Sender).Tag, -1);
end;
end;
@@ -606,7 +606,7 @@
Cmd := SC_CLOSE
else
Cmd := SC_MINIMIZE;
- SendMessage(ChildForm.Handle, WM_SYSCOMMAND, Cmd, GetMessagePos);
+ SendMessage(ChildForm.Handle, WM_SYSCOMMAND, Cmd, -1);
end;
end;
end;
When I trying install design package to DX Seattle I obtain error [dcc32 Fatal Error] TB2Reg.pas(94): F2613 Unit 'ImgEdit' not found.
I add to additional compilator directives -LUDesignIDE
bud compilation still results in an error. How can I add package to DX Seattle? Thank you, Pavel
Issue imported from Google Code:
https://code.google.com/p/tbxlib/issues/detail?id=4
Reported by pavel [at] tresnakovi.cz, Apr 7, 2013
What steps will reproduce the problem?
Sometime is graphics bug (see on attached picture)
RAD studio XE2 (Upd4 HotFix1)
Replace this code to remove BUG in unit TBXDkPanels.
Message.wParam and Message.lParam are different types !
procedure TTBXPanelObject.WMEraseBkgnd(var Message: TMessage);
begin
if not DoubleBuffered or (LPARAM(Message.wParam) = Message.lParam) then
begin
if Color = clNone then
DrawParentBackground(Self, TWMEraseBkgnd(Message).DC, ClientRect)
else
FillRectEx(TWMEraseBkgnd(Message).DC, ClientRect, Color);
end;
Message.Result := 1;
end;
The copy of a toolbar-item from form-a and paste on form-b toolbar will fail (reader error):
Fix:
The DsgnItemEditor needs your own DesignWindows.pas
In the TDesignWindow add private error handler:
procedure ReaderErrorHandler (Reader: TReader; const Message: string; var Handled: Boolean);
Handler proc:
procedure TDesignWindow.ReaderErrorHandler (Reader: TReader; const Message: string; var Handled: Boolean);
Begin
ShowMessage ('Reader Error on component and property: >>' + Message + '<<');
Handled := True;
End;
add the OnError
try
R.OnError := ReaderErrorHandler;
R.OnSetName := ReaderSetName;
We use old version of TBX 2.2 alpha (with some fixes) which was include design-time component TTBXImageList. I wanted to start using your version of TBX but I found that this component is missing.
So, I want to ask you why is it missing and is it possible to include it?
TBX 2.2 alpha: https://torry.net/files/vcl/bars/toolbars/tbx22alpha.zip
TBXImageList is 4 units:
This component still works for Delphi 2007 to latest Rio 10.3.2 (for Win32 target only).
TBXImageList_Rio.zip (with some minor fixes for Rio).
Thank you for maintaining the great TBX software.
Please consider adding support for High-definition monitors. Nowadays, lot of users have Windows interface scaling level set to 200% and more, to accommodate to 4K displays, so the screen density is no longer 96 DPI. In Toolbar2000, all item sizes are programmed in physical pixels, not adjusted to screen DPI, so the items like toolbar grips, chevrons, arrows look very small.
So the adjustments are needed to multiply element size to actual screen DPI and divide by 96 (normal DPI). It is usually obtaining by using MulDiv instruction.
For example, see how GetTBXDragHandleSize from TBXThemes.pas will look like:
function GetTBXDragHandleSize(const ADC: HDC; const ToolbarInfo: TTBXToolbarInfo): Integer;
const
FDragHandleSizes: array [Boolean, 0..2] of Integer = ((9, 0, 6), (14, 14, 14));
begin
with ToolbarInfo do
begin
if AllowDrag then
Result := MulDiv(FDragHandleSizes[(CloseButtonState and CDBS_VISIBLE) <> 0, DragHandleStyle], GetDeviceCaps(ADC, LOGPIXELSY), 96)
else
Result := 0;
end;
end;
Please consider adding support for custom DPI, other than 96, to accommodate modern high resolution monitors.
I have made a few changes to the code, but it would be better if you fully implement custom DPI support in the main code base.
Thank you very much again for maintaining the TBX library.
As it goes for an 13 th...
If you use a floating & resizable toolbar and/or dockpanel on Win 10 (resizable = false is OK!!) the NC caption get's ugly with a WHITE bar at the top of the Toolwindow.
Currently I am working to fix it, but looks ugly while on
All Themes: Border.Y := GetSystemMetrics(YMetrics[Resizable]) is not used to a common function
also the NC caption drawing requires adapation
while the ugly part on Win 10 and new Windows-Themes, the border width is now 1 pixel and may also Windows- Themes dependent.
Hello!
Compatible with Delphi/C++Builder 4โXE5.
but Packages folder couldn't contain packages for C++ Builder. How to install this TBX to Builder?
Thanks
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.