Jump to content

Stano

Members
  • Content Count

    867
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Stano

  1. To my knowledge, unless it's changed, OnShow is called on every new form view. MyForm.Hide -> MyForm.Show(Modal)
  2. There is no problem at column 0. I'm addressing the other ones. I found this on the internet. I don't understand the code, but it works. There is one problem. It is ugly at the moment. Is there a solution where it will be prettier? I just need to display it! I don't like the use of the image. A1. Draw a CheckBox and start drawing in OnAfterCellPaint. Here you can see the styles in Winapi.Windows, not only the CheckBox, but also the RadioButton. uses Winapi.Windows; procedure TfrmFilterCust.vstAfterCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; CellRect: TRect); var vANode: PCustNode; begin if Column = 3 then begin vANode := Sender.GetNodeData(Node); if vANode.IsCustomer then DrawFrameControl(TargetCanvas.Handle, CellRect, DFC_BUTTON, DFCS_CHECKED) else DrawFrameControl(TargetCanvas.Handle, CellRect, DFC_BUTTON, DFCS_BUTTONCHECK); end else if Column = 4 then begin vANode := Sender.GetNodeData(Node); if vANode.IsSupplier then DrawFrameControl(TargetCanvas.Handle, CellRect, DFC_BUTTON, DFCS_CHECKED) else DrawFrameControl(TargetCanvas.Handle, CellRect, DFC_BUTTON, DFCS_BUTTONCHECK); end; end; A2. Click on CheckBox to select the Node using the OnMouseDown mouse. procedure TfrmFilterCust.vstMouseDown(Sender: TObject; Button: TMouseButton; procedure TfrmFilterCust.vstMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin FSeledNode := vst.GetNodeAt(X, Y); end; Edit the material properties in the OnColumnClick event and redraw the RepaintNode in the call. procedure TfrmFilterCust.vstColumnClick(Sender: TBaseVirtualTree; Column: TColumnIndex; Shift: TShiftState); var vANode: PCustNode; begin if Column = 3 then begin vANode := Sender.GetNodeData(FSeledNode); vANode.IsCustomer := not vANode.IsCustomer; Sender.RepaintNode(FSeledNode); end else if Column = 4 then begin vANode := Sender.GetNodeData(FSeledNode); vANode.IsSupplier := not vANode.IsSupplier; Sender.RepaintNode(FSeledNode); end; end; This completes the display and editing of the CheckBox in the column. B. Check box in the header Edit header \ Columns \ Column[n] \ Set properties in properties: CheckBox = True , Show CheckBox. CheckType = ctCheckBox, typ je CheckBox a RadioButton CheckState = csUncheckedNormal //csCheckedNormal to see if there is a check In the properties, edit the header\Options check itShowImages in the properties edit TreeOptions\MiscOptions check to checkSupport
  3. Stano

    VirtualStringTree as table - CheckBox in columns

    I'll look into it. I don't want to use images. Maybe the feature in question is about something else. I'll see.
  4. Stano

    Delphi's __recovery folder

    If you have history turned on, you can find it there.
  5. I wouldn't do that. You or user can call an OnShow event repeatedly. It will create objects each time.
  6. Stano

    Error loading data???

    The welcome page is configurable. See bottom left: Edit layout. No registers and the like.
  7. They've already gone back to them. On the recommendation of MS itself
  8. I don't think that's your problem. But we're gonna write it here anyway. I got the contents of the tables (Paradox) in *.xls. I copied them to *.csv. Then imported them into Firebird. I had errors of type String cannot be converted to integer even for date. I selected the entire column(s) in Excel and formatted. I repeated the whole procedure. Everything worked.
  9. Stano

    Deleting a Field Problem

    I would also check the dfm file.
  10. Stano

    Refresh dbedit after insert

    I have a policy that if the user is in Insert/Edit mode, they can't "click" anywhere else. In other words. I will not allow him to take an action that would interfere with working on a record.
  11. I use that theme. With the default setting the highlight/background is not visible at all. I haven't found it. If this can be set, can someone throw me a screenshot here?
  12. I went back to CnPack. There I can set the highlighting for the whole unit. Delphi only does it in a function. For me, the blue color is not distinctive enough. I have to look for it. With CnPack it hits the eye.
  13. Thank you. 100 It's better. It's far from perfect. The blue color doesn't fit. Yellow would be good. If CnPack has it
  14. Stano

    Delphi 11.3 is available now!

    My whole installation was broken by Norton 360. It wouldn't run *.tmp, *.vsf, *.rtf ... files. It took me a while to shut it down. Then I had to reinstall everything. I don't have much.
  15. Hi, MyDBNavigator.DataSource - connect MyDataSource Delete directly from MyDataSource form I get an abstract error. The DFM file is fine. MyDataSource is not there. Nothing can be done. I know the error is with me. I don't know where and how to look for it. This points to problems with DesignEditors. I don't see a way to do anything about it. ======= [23B7D1D7]{dcldb280.bpl} Vcl.Design.QuickDataSourceEditors.TValue.AsType<System.Classes.TComponent> (Line 2675, "System.Rtti.pas" + 2) + $12 [23B7CF05]{dcldb280.bpl} Vcl.Design.QuickDataSourceEditors.TQuickDataSourceSelectionEditor.BuildContextMenu (Line 61, "Vcl.Design.QuickDataSourceEditors.pas" + 15) + $3F ======= [5B181456]{rtl280.bpl } System.SysUtils.AbstractErrorHandler (Line 24239, "System.SysUtils.pas" + 0) + $12 [5B13C3C0]{rtl280.bpl } System.@AbstractError (Line 11379, "System.pas" + 2) + $0 [5B239B59]{rtl280.bpl } System.Classes.FindRootDesigner (Line 6097, "System.Classes.pas" + 1) + $B [5A84FB90]{designide280.bpl} DesignEditors.TComponentProperty.AllEqual (Line 1842, "DesignEditors.pas" + 7) + $6 ======= This applies to all connected components. It's very annoying. See the blank line in the attachment. There I have deleted another component as DataSource.
  16. I seem to have found it procedure TjstFDNavigator.Notification(AComponent: TComponent; Operation: TOperation); begin inherited Notification(AComponent, Operation); if (Operation = opRemove) and (AComponent = DataSource) then DataSource := nil; end;
  17. That is the answer I have already received. According to the picture and the error listing, the problem is elsewhere. I used the standard DBNavigator as a sample. I didn't write it quite right. AV is only sometimes. I apologize. DBNavigator is derived from TCustomPanel. That doesn't play any role here. I don't have any such code. I am attaching the whole unit. jstFDNavigator.pas
  18. OT I don't have any mental disorder. But I have yet to meet a person who understands my thinking. Some told me directly. Simply, every person has a unique mindset. There is always something different from others. Some more and some less. I more.
  19. I think the big companies have a different opinion. See MS and its 365. I totally agree with the rest.
  20. Reading is interesting. Only no one mentioned: the internet goes down connection is slow - for whatever reason At that point the program is unusable. If its creator didn't think of it.
  21. Stano

    Delphi 11.2 unofficial LSP patch

    Maybe. We can only hope for a better future.
  22. Stano

    Change behaviour of DateTimePicker

    Maybe just write the short day and month shaped with a null. 01, 05 ...
×