All Activity
This stream auto-updates
- Today
-
When working with styles, the Color property of the form is ignored. Unless seClient is removed from its StyleElements property, the forms client space is controlled by the style.
-
Like MessageDlg the dialog (MessageDlg2) resizes based buttons, button captions, based on OS language, font size, etc., and it was cleaner to use a panel. TLabel, at least, had other issues to overcome. Drawing on the form, I had not thought of that solution. Good idea. I had the framework for a custom panel, from another form, so I grabbed it. For now, because the only issue is the "Windows" style, window color, I check for it when fetching the window and font color, Down the road I might look at drawing on the form. It is an interesting, and perhaps a cleaner, solution. Thanks for your help Remy.
-
Why not use a transparent Label? Otherwise, maybe just get rid of the Panel altogether and draw the text directly on the Form itself using a transparent draw.
-
LoadLibrary and FreeLibrary notification
Anders Melander replied to Pierre le Riche's topic in Windows API
LdrRegisterDllNotification (Vista+) LdrInitShimEngineDynamic (undocumented, XP+ AFAIK) - Yesterday
-
I "FillRect" the canvas of the panel, with the color returned by the style manager. There is not a label. I DrawText the text on the canvas. Amakrits style works.
-
Yes. ParentBackground state made no difference. The form color is set to clWindow.
-
Are you trying to install a Design-time package that relies on a XE2-compiled runtime package? That won't work, of course. What are are the required the packages of this Delphi project? Can you share the DPK of the package you're compiling/installing?
-
Hello, I have similar problem as here: Delphi package was create in Delphi XE2, now I'm trying to install it with Delphi 12. Build and Compile goes without problems, only Installing is the problem. It says Can't load package, specified module can't be found. I created new project, added same files, still the same error. What is wrong?
-
I've found it to be helpful as well in many situations. Just this morning, I was updating an old Delphi XE program that needed to get a list of available drives and forgot what the procedure was called. Sure, I could've looked it up but Claude reminded me of GetLogicalDriveStrings much quicker. Earlier this week, I wanted to try out Claude Code on my Windows machine. I learned it required Linux and didn't work on my currently installed WSL version 1. (The web-based) Claude helped me figure out which version of WSL I had, install WSL 2, then even though it was installed, WSL 1 was still the default so it helped me change that. Then, I had to go through a similar process with nodejs and npm. I learned several new "wsl" commands and got it up and running. It would've taken me many hours hunting down forums and blog posts to put all those pieces together--I probably would've given up. It's not great at writing whole programs or untangling a huge library of code but it can sure save time in many instances.
-
A TCustomPanel is not filled with a color, but with part of the style bitmap (defined in the GroupBox.Frame object). In a lot of cases this may be similar to a solid color, but it can as well be some texture or even a transparent area for some styles like Amakrits. You might really get the best results with setting the labels Transparent property to True.
-
Did you try ParentBackground=True on the Panel? Then you would set only the Form's color and the Panel would pick up the same color.
-
Hi, For performance reasons I am caching a map of the address space in the stack tracing code inside FastMM_FullDebugMode.dll. This map goes stale whenever a library is loaded or unloaded, and I've been dealing with this rather crudely: by handling the ensuing access violations in a try...except block. These access violations can be quite annoying when running the application under the debugger, so I would like to make them less likely. Invalidating the map whenever a library is loaded or unloaded would be an improvement. I've therefore been looking at ways to be notified when a library is loaded or unloaded, but the only solution I have found is patching the LoadLibrary and FreeLibrary calls in kernel32.dll in-memory to insert a hook. Is there a better strategy? The mechanism doesn't have to be 100% accurate, so if there's a proxy for LoadLibrary and FreeLibrary that is less invasive I would rather go for that. Thanks, Pierre
-
I am trying to rotate a 3D object (StrokeCube) to align its Y axis with a line segment defined by two points (two Spheres). Is there an easy way to do this using say CreateLookAtRH, or similar? The Help and https://docwiki.embarcadero.com/ does not describe this and similar methods and I cannot find any example code. Having searched and read for a few days/nights, I've gone down the scary path of rotation matrices etc. This is the process I have so far: Create Vector1 as the AbsoluteUp (TVector3D) of the StrokeCube. Create Vector2 that runs from Sphere1 to Sphere2 (subtracting them), also TVector3D. Normalise the two vectors. Create RotationAxis by calculating their cross product (RotationAxis perpendicular to both). Normalise RotationAxis. Calculate Angle between Vector1 and Vector2 as arccos of their dot product divided by (Vector1Length*Vector2Length). R := mat.CreateRotation() with the normalised RotationAxis and the Angle. Getting the X Y Z rotations for the StrokeCube out of R does not give correct results. I've tried many variants, e.g. https://learnopencv.com/rotation-matrix-to-euler-angles/ and https://uk.mathworks.com/matlabcentral/answers/493771-euler-3d-rotation-between-two-vectors. My questions: Is there an easy way to align a 3D object (StrokeCube) to a line defined by two points? If not, then is my processing correct so far? What matches the X Y Z rotations of an FMX 3D object? One of the Euler sequences, Quaternions, or something else? How do I extract the necessary rotations from the rotation matrix? Thanks for your help. Update: I've tried these but they don't rotate the Segment (StrokeCube): Segment.AbsoluteMatrix.CreateRotation(Vector3DP1P2n, Angle); Segment.AbsoluteMatrix.CreateLookAtRH(TPoint3D.Create(M1.Position.X,M1.Position.Y,M1.Position.Z), TPoint3D.Create(M2.Position.X,M2.Position.Y,M2.Position.Z), TPoint3D.Create(0,0,0)); Segment.LocalMatrix.CreateRotation(Vector3DP1P2n, Angle); Segment.LocalMatrix.CreateLookAtRH(TPoint3D.Create(M1.Position.X, M1.Position.Y, M1.Position.Z), TPoint3D.Create(M2.Position.X,M2.Position.Y,M2.Position.Z), TPoint3D.Create(0,0,0));
-
Allan chawinga joined the community
-
Gabor64738 joined the community
-
The text is drawn on a TCustomPanel. The custom panel is on the form (TForm).
-
What type of control is the Parent of the label (TForm, TPanel,...)?
-
Are you calling the TFDQuery.ApplyUpdates() method somewhere after you call Post? https://docwiki.embarcadero.com/RADStudio/Athens/en/Caching_Updates_(FireDAC)
-
Claude a. I. Recently I've had three opportunities to use Claude in my D12 Fmx development. 1. Needed to know how to scroll to a TListboxitem that was not visible. I had three different solutions off the net - none of which worked. Claude provided me with three different solutions, suggesting that #2 would be best for android. It worked a treat! I've been wrestling this one for a while... 2. I have about 50 color themes for this app. I needed help naming them. My wife just rolled her eyes. I uploaded a text list in the form: Theme Name 1: #Hexcolor1 #Hexcolor2 #Hexcolor3 #Hexcolor4 Theme Name 2: #Hexcolor1 #Hexcolor2 #Hexcolor3 #Hexcolor4 Claude provide a list of names almost instantly - and they were 90% spot on. (i.e. Wedgewood became Limestone Quarry) 3. I have a certain unique store/shopping type to represent, and was trying to layout a table structure for the store. I described the store and what it selling and what I needed to Claude. I got back a very long and detailed description, including the field structure and types. Anyway it saved me a lot of time.
-
You mean what all the other styles return, I guess I am confused. Perhaps I am all wet, 10 are correct, one is incorrect; the 1 seems to be the issue.
-
Feel free to file a bug report.
-
See here: Update: You can see what colors are returned here: function TUxThemeStyle.DoGetStyleColor(Color: TStyleColor): TColor; begin case Color of scBorder: Result := clWindowFrame; scButtonDisabled: Result := clBtnFace; scButtonFocused: Result := clBtnFace; scButtonHot: Result := clBtnFace; scButtonNormal: Result := clBtnFace; scButtonPressed: Result := clBtnFace; scCategoryButtons: Result := clBtnFace; scCategoryButtonsGradientBase: Result := $C0C0C0; scCategoryButtonsGradientEnd: Result := $F0F0F0; scCategoryPanelGroup: Result := clMedGray; scComboBox: Result := clWindow; scComboBoxDisabled: Result := clWindow; scEdit: Result := clWindow; scEditDisabled: Result := clWindow; scGrid: Result := clWindow; scGenericBackground: Result := clBtnFace; scGenericGradientEnd: Result := $C0C0C0; scGenericGradientBase: Result := $F0F0F0; scHintGradientBase: Result := clInfoBk; scHintGradientEnd: Result := clInfoBk; scListBox: Result := clWindow; scListBoxDisabled: Result := clWindow; scListView: Result := clWindow; scPanel: Result := clBtnFace; scPanelDisabled: Result := clBtnFace; scSplitter: Result := clWhite; scToolBarGradientBase: Result := $C0C0C0; scToolBarGradientEnd: Result := $F0F0F0; scTreeView: Result := clWindow; scWindow: Result := clBtnFace; else Result := clNone; end; end;
-
See the examples above. Correct as in the color returned is the same, or not, as the color of the window.
-
That depends on the definition of correct.
-
Thanks for the response. The issue is: bgColor:=actStyle.GetStyleColor(scWindow); returns the correct color for all styles I tested, 10 or so, except one, "Windows".
-
I may be misunderstanding the issue, but I use (Style).IsSystemStyle to check for the "Windows" style.