Forum Replies Created
-
AuthorPosts
-
Hi Andrew,
I apologize for the long delay. Apparently, the notification of new posts to the forums stopped sending out notifications.Unfortunately, we do not have any additional C++ examples outside the ones that are distributed with the components. However, it appears that your real question is more of a data marshalling question rather than a drag and drop question.
For instance, it appears that the drag data is being transmitted to the destination app. However, given that you are copying your object’s data using memcpy and using the address to send the data, I’m not sure what you will be able to do with that on the receiving end. That is, I think a better approach would be to package up the object information you want to drag into some well defined format (e.g. JSON, xml, etc), and then provide that in the drag operation. Then on the receiving side, you would receive the well defined object information. You could then create a new instance of your object and then use the drag payload to populate the object’s properties.
Hope this helps, and again I apologize for the delay in responding.
Ray
Hi,
You should have received the email with your serial number by now. If not, please check your Junk Email filters.
Ray
Hi Peter,
The TRzTabbedListBox (well, the TRzCustomTabbedListBox) uses the TabbedTextOut method to display the tabbed contents of the list box. However, if you simply want to change the color of the text of a list box item, you can called the DefaultDrawItem method in the OnDrawItem event handler. For example,
procedure TForm7.RzTabbedListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin if not ( odSelected in State ) then begin if Index mod 2 = 0 then RzTabbedListBox1.Canvas.Font.Color := clRed else RzTabbedListBox1.Canvas.Font.Color := clBlue; end; RzTabbedListBox1.DefaultDrawItem( Index, Rect, State ); end;This event handler colors the lines alternating colors. Since Index starts off at 0 for the listbox, the first item is colored red. The second is blue, and the third is back to red, etc. However, if the item is selected, then the font color is not changed so that the selected font color is used against the selection background color.
Ray
Hi,
No, you are not using it incorrectly. Unfortunately, there was a change in C++Builder (I do not remember the precise version), but it broke the TraceMethod functionality. It’s on our list of things to fix for the next major release. In the meantime, you can use the EnterMethod/ExitMethod approach to group your CodeSite messages by method.
Ray
The vsWinXP value originally meant, use the new Windows XP Visual Styles (i.e. Themes back in the day). Any when VCL Styles were introduced, vsWinXP by the very nature of how Embarcadero (CodeGear) implemented VCL Styles, the vsWinXP also meant to use the currently active VCL Style.
Yes, it would most certainly be nice to change the enum value to something more appropriate, but that is not a simple task. Each component that has a property like that would need to have a ReadProperties override in order to “fix up” any reference to that enum that already exists in a DFM file. Although, I believe that is the default value, so maybe there are not that many references to it in actual DFM files.
Feel free to submit a request into Embarcadero’s Quality Portal to rename the enum.
Ray
Hi,
Ah, you are using the Community Edition. I believe Embarcadero limits what software packages are available in GetIt for the Community Edition. You would need to contact Embarcadero for confirmation.
Ray
Hi,
The CodeSite Express installer is only available via the GetIt Package Manager. I just started Delphi 10.4 and selected Tools > GetIt Package Manager. I then entered CodeSite into the search box and the CodeSite Express entry was displayed in the results.
Ray
Hi Uwe,
Thanks for the report. I’ve been working on High DPI support for all the CodeSite Tools apps–I’ll be sure to include the Method Tracer as well.
Ray
Hi Chris,
I just created a 64-bit Windows test project in Delphi 11 with the TRzDBGrid from KSVC 7 and it compiled and ran just fine. As noted in my earlier responses, this would suggest either a problem with your Library Search Path or the original installation of KSVC that Embarcadero released for Delphi 11. I would suggest uninstalling KSVC 11 and then re-install it.
Ray
Hi,
The rotation of the font does require a True Type font to be selected. If a non-true type font is selected, then the font is automatically changed to Verdana. Other than that, the rendering of the font is handled by the Windows API.
Ray
Hi Olivier,
What properties have you changed in the TRzGroupBox? I created a test project and set the Color property to clSkyBlue and the VisualStyle to vsClassic, and when I ran the project, the group box appeared blue at runtime.
Can you duplicate the problem in a test app? If so, please send the source code (no executables) to our support email and I’ll take a look.
Ray
Hi,
I suspect that you are using the same logger instance when calling the TraceMethod method as well as the other Send() calls within the method. The TraceMethod call will result in the same logger to be used when the method exits to send the ExitMethod message. Therefore, if the category of the logger changes inside the method, then that category will be used when sending the ExitMethod message. You would get the same behavior if you called EnterMethod() instead of TraceMethod at the beginning of the method, and ExitMethod() at the end.
However, if you use a separate logger instance, then the categories are maintained. For example,
procedure TForm30.FormCreate(Sender: TObject); begin CodeSite.Category := 'CodeSite'; csTracer := TCodeSiteLogger.Create( Self ); csTracer.Category := 'Tracer'; end; procedure TForm30.Button1Click(Sender: TObject); begin csTracer.TraceMethod( 'Button1Click' ); CodeSite.Send( 'Height', Height ); CodeSite.Send( 'Main Form', Self ); end;The csTracer is defined as a private field in the form declaration. When you click the button, the EnterMethod and ExitMessage messages in the Viewer will be associated with the “Tracer” category, while the Height and Main Form messages will be associated with “CodeSite”.
Ray
Thanks for the report. We’ll look into adding that for the next release.
Ray
November 12, 2021 at 12:37 am in reply to: RzPageControl: displaying a hint on the tab rect (or image) only #2755Hi Patrick,
This is kind of a hack, but it may be good enough for your needs.
Ray
type TRzPageControlAccess = class( TRzPageControl ) end; procedure TForm27.FormCreate(Sender: TObject); begin Application.OnShowHint := ShowHintHandler; end; procedure TForm27.ShowHintHandler( var HintStr: string; var CanShow: Boolean; var HintInfo: Vcl.Controls.THintInfo); var P: TPoint; Idx: Integer; TabDataList: TRzTabDataList; begin P := HintInfo.CursorPos; Idx := RzPageControl1.TabAtPos( P.X, P.Y ); if Idx <> -1 then begin TabDataList := TRzPageControlAccess( RzPageControl1 ).GetTabDataList; if P.X < TabDataList.Items[ Idx ].RawRect.Left + 20 then begin HintStr := 'Tab Image ' + Idx.ToString; end else begin HintStr := 'Regular Tab ' + Idx.ToString + ' Hint'; end; end; end;November 11, 2021 at 11:51 pm in reply to: Konopka Signature VCL Controls Problems on Delphi Sydney 10.4 #2754Hi Alvaro,
KSVC is deployed via the GetIt Package Manager for 10.4. I’m not aware of any way to manually install KSVC.
Ray
-
AuthorPosts