Forum Replies Created
-
AuthorPosts
-
Hi Hans,
Thanks for the report. That’s a good catch. The issue has been fixed and will included in the upcoming 5.4 release.
Ray
Hi Peter,
The QuickCompare functionality is designed to test a condition for each row and if the condition is met, the row is colored using the QuickCompare.Color value. As such, it really is not designed to handle what you are suggesting.
Allowing multiple conditions would be a way to handle that, but that would require changing the QuickCompare property to a collection. It is certainly something that you should request from Embarcadero. (BTW, I’m trying to find out from Embarcadero, what is the property way customers can submit bug reports and enhancement requests for the KSVC. I’ll post my findings in this forum).
As an alternative, you may be able to accomplish what you wish by handling the OnDrawColumnCell event.
Ray
Hi Marek,
Thanks for the report. I am able to duplicate the issue. I’ll have to dig into the changes that Embarcadero made for version 7 to see what is going on. I am also finding out from Embarcadero how customers should report bugs (like this) on the components.
Ray
Hi Barry,
First of all, I want to apologize for what happened to this post and your other one on the same topic. I’m still not entirely sure how it happened, but your two posts were flagged by the forum software that our site uses and required approval before being published. Unfortunately, I missed the notification and noticed them when I was doing some site maintenance.
As for the behavior that you are reporting, that is actually coming from the lower-level TCustomGrid code and the default setting for DrawingStyle of gdsThemed. The low-level code is blending the highlight color with the color of the cell, which is resulting in the darker blue color for the shaded cells.
To work around this, you can try using a different setting for DrawingStyle, or write an event handler for the OnDrawColumnCell event. For example,
procedure TForm16.RzDBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if gdSelected in State then begin RzDBGrid1.Canvas.Brush.Color := clRed; RzDBGrid1.Canvas.Font.Color := clWhite; end; RzDBGrid1.DefaultDrawColumnCell( Rect, DataCol, Column, State ); end;
The above code will result in the selected row always being displayed as white text on a red background.
Ray
Hi Ken,
I have been unable to duplicate the behavior you show in your screenshots. Are you able to duplicate the issue in a test project? It appears that you have HotTrack turned on, but you must also have the ThemeAware property turned off. What I do not know is if you are using a VCL style for the rest of the form, etc.
Ray
Hi,
Thanks for the post. Since Embarcadero owns the controls, I would suggest submitting a bug or enhancement request for them to fix this. Also, I’m not sure if the code you posted is complete. I’m not sure where Form is defined.Ray
Hi Steve,
The TRzStatusBar uses the built-in Align functionality to manage the positions of the status panes. The panes are separate controls and their position is defined by the Align property and their relative location to the other status panes. This is essentially no different than a panel with a bunch of labels (or other controls) with their Align properties set.
With that said, in the VCL it is possible for controls to be repositioned relative to other controls that have the same Align value. Typically, this happens when controls are dynamically created, or the size of the control is changed at startup.
The easiest way to fix the order is to set the Left property of the out of order control. Suppose Pane6 appears to the left of Pane5. To move Pane6, set Pane6.Left := Pane5.Left + 1; By change the Left property, the VCL will re-align the controls and position Pane6 to the right of Pane5.
Hope this helps.
RayJuly 27, 2021 at 2:44 am in reply to: Change Color of TRzComboBox When Style is csDropDownList. #2554Hi Steve,
Unfortunately, not directly using the component. The Custom Framing properties (e.g. FrameVisible) will affect the frame of the control, but the client area is managed by Windows and it treats the csDropDownList style as special.
Now, as an alternative, you could use a custom VCL style for the combo box and get the appearance you are looking for. The new per-control VCL Styling could be very useful in this case where you could just customize the particular combo box that you are trying to color.
Ray
You can affect the sorting of the ShellTree used by the RzSelectFolderDialog component by do a little bit of a hack. For example,
uses RzShellFolderForm; procedure TForm13.RzButton1Click(Sender: TObject); begin RzSelectFolderDialog1.Execute; end; function CustomSortProc(Node1, Node2: TTreeNode; Data: Integer): Integer; stdcall; begin Result := -AnsiStrIComp(PChar(Node1.Text), PChar(Node2.Text)); end; procedure TForm13.RzSelectFolderDialog1FormShow(Sender: TObject); begin TRzSelectFolderForm( RzSelectFolderDialog1.Form ).ShellTree.CustomSort(@CustomSortProc, 0); end;
This example will reverse sort the nodes in the Shell Tree.
The problem is that there is no simple way to get at the information you want to sort on. That is, the date modified. That information is not tracked with each node in the Shell Tree. You may be able to do some other lookup to get the information you need, then you could modify the CustomSortProc function to sort by modified date.
Ray
Hi Steve,
The csSimple style is a very old style of Windows COMBOBOX. It is essentially a and edit box and a list (just like what we typically think of as a combo box), but the edit box and list box are always visible.
If you drop a TComboBox or TRzComboBox onto a form and then change the Style to csSimple you will notice that the drop arrow goes away. What is not so obvious is that you can then use the drag handles to make the control taller. When you do this, you will see the list portion of the control become visible.
BTW, the controls used in the standard Font dialog box (for font name, style, and size) are “simple” combo boxes.
Hope this helps,
RayHi Jay,
The TRzTreeView is a descendant of the TTreeView and inherits the same properties and events. Specifically, you can do some customizations by handle the OnAdvancedCustomDrawItem event.
For example, I created a test app where I dropped a TRzTreeView on the form. I then added a FormCreate event handler, and an event handler for the tree view’s OnAdvancedCustomDrawItem event.
procedure TForm11.FormCreate(Sender: TObject); var Node: TTreeNode; begin Node := RzTreeView1.Items.Add( nil, 'One' ); RzTreeView1.Items.AddChild( Node, 'AAAA' ); RzTreeView1.Items.AddChild( Node, '1111' ); Node := RzTreeView1.Items.Add( nil, 'Two' ); RzTreeView1.Items.AddChild( Node, 'BBBB' ); RzTreeView1.Items.AddChild( Node, '2222' ); Node := RzTreeView1.Items.Add( nil, 'Three' ); RzTreeView1.Items.AddChild( Node, 'CCCC' ); RzTreeView1.Items.AddChild( Node, '3333' ); RzTreeView1.FullExpand; end; procedure TForm11.RzTreeView1AdvancedCustomDrawItem( Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage; var PaintImages, DefaultDraw: Boolean); begin if Node.Text = 'AAAA' then RzTreeView1.Canvas.Font.Color := clRed else if Node.Text = 'BBBB' then RzTreeView1.Canvas.Font.Color := clBlue else RzTreeView1.Canvas.Font.Color := clBlack; end;
When you run the app, you will see the AAAA and BBBB in their respective colors.
Hope this helps.Ray
Hi Goran,
Embarcadero added better support for HighDPI in the controls in version 7. Yes, you will need to uninstalled 6.5.0 from RAD Studio 10.4 before installing version 7. Unfortunately, Embarcadero does not state this anywhere in GetIt and they did not create the installer to check if version 6.5 is already installed. So, if you have 6.5 installed and try to install version 7, you’ll get some odd errors about packages already being loaded. The solution is to use the GetIt Package Manager to uninstall version 6.5 first, then install 7.0.Hope this helps.
RayThanks!
Hi Mark,
You did not do anything wrong. The demo was simply not updated for the 6.5.0 and 7.0.0 releases. Fortunately, it is easy to fix. For the UsingSystemStyle error add Self as a parameter:
if UsingSystemStyle( Self ) then …
After fixing the first one, you will get a couple more. Then you will get an error with the call to GetGradientPanelFrameColor. Again, you can simply add Self as the first parameter:
C := GetGradientPanelFrameColor( Self, FCurrentGCS )
Ray
Niels,
CodeSite 4 did provide a way to block individual message types in the Dispatcher. There was a Blocked Messages tab (along with a Blocked Categories) in the Settings. However, we removed it from CodeSite 5 because it was hardly ever used and added more complexity to the Dispatcher.
Your request is interesting in that you are blocking the message types from the logging side. However, your example use case is a bit confusing to me. In the RELEASE case, the logger itself is disabled so blocking message types would make no difference.
Could you elaborate more on how you would like to use this functionality?
Ray
-
AuthorPosts