Jump to content

Bernard

Members
  • Content Count

    45
  • Joined

  • Last visited

  • Days Won

    1

Bernard last won the day on January 30 2021

Bernard had the most liked content!

Community Reputation

17 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Bernard

    Import .NET Assembly list is empty

    .Net import still producing empty list in latest version "Delphi 11.1"
  2. Thanks I will do that.
  3. Yes this was the issue I was trying to fix and the above code sorts it by detecting the direction of the drag.
  4. I have been looking to find the best way to move rows in a VirtualTreeview and want to check that this is the best way I put this code into the Minimal VT Demo Depending on the drag direction I want to either move the row to position above or below the drop position. It works but it requires setting up a global mouse position vtStartDragPoint. Is there a more elegant way? procedure TMainForm.VSTDragAllowed(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; var Allowed: Boolean); begin Allowed := True; end; procedure TMainForm.VSTDragDrop(Sender: TBaseVirtualTree; Source: TObject; DataObject: IDataObject; Formats: TFormatArray; Shift: TShiftState; Pt: TPoint; var Effect: Integer; Mode: TDropMode); var Nodes: TNodeArray; Attachmode: TVTNodeAttachMode; begin Effect := DROPEFFECT_MOVE; var vtEndDragPoint := Mouse.CursorPos; if vtStartDragPoint.y < vtEndDragPoint.y then Attachmode:= amInsertAfter else Attachmode:= amInsertBefore; Nodes:= vst.GetSortedSelection(false); VST.MoveTo(Nodes[0], Sender.DropTargetNode, Attachmode, false); end; procedure TMainForm.VSTDragOver(Sender: TBaseVirtualTree; Source: TObject; Shift: TShiftState; State: TDragState; Pt: TPoint; Mode: TDropMode; var Effect: Integer; var Accept: Boolean); begin Accept := True; end; procedure TMainForm.VSTStartDrag(Sender: TObject; var DragObject: TDragObject); begin vtStartDragPoint := Mouse.CursorPos; end;
  5. If the strings are all in one file then notepad++ and a macro or two should work.
  6. Bernard

    RAD Studio 11 Alexandria is now available

    Hi all, So I had been looking forward to some juicy update for this version of Delphi. Looking at the roadmap I thought they have this one in the bag for me. 2 things I was looking forward to were.. 1) Delphi Language Extensions for increasingly powerfull coding 2) Math performance improvements to increase your application speed Do these come in the form of later updates...
  7. Bernard

    RAD Studio 11 Alexandria is now available

    Has there been an improvement in maths performance?
  8. Bernard

    RAD Studio 11 Alexandria is now available

    Is there a list of language enhancements?
  9. Bernard

    Touch Screen VCL

    Thank you both for the feedback. This info should help 🙂
  10. Bernard

    Touch Screen VCL

    Hello Everyone, I have been moving to a keyboard mouse free interface on a machine. I have introduced a Touchscreen interface on a machine running Windows 10 Pro. Issue. On the screen there are a few buttons that jog motors. When you press the key it will not register unless you move (wiggle) your finger about on the screen. So the functionality (on touch screen with finger) I am looking for is... Press and hold button. Motor starts moving. Release button. Motor stops. Thank you.
  11. I came accross an issue when assigning values to an 'array of word' earlier This works var WordArray : TArray<Word>; begin setlength(WordArray, 10); WordArray := [0, 7323, 0, 7224, 0, 7124, 0, 7024, 0, 7004]; end; This works var WordArray : TArray<Word>; begin setlength(WordArray, 10); WordArray := [0, word(73232), 0, 7224, 0, 7124, 0, 7024, 0, 7004]; end; This does not work var WordArray : TArray<Word>; begin setlength(WordArray, 10); WordArray := [0, 73232, 0 ,7224, 0, 7124, 0, 7024, 0, 7004]; end; [dcc32 Error] TestArray.pas(28): E1012 Constant expression violates subrange bounds Can someone explain why the above code is not accepted. For curious reasons. I am stupid I see why I was outside the max range of Word.
  12. Bernard

    Inch representation format in TEdit like controls

    I have a half baked component that accepts metric or imperial. Half baked because in metric mode it works in mm only In Imperial mode it works in inches only. It does not display fraction format but accepts it so these are all valid input 6'3" 5m23cm 1 1/5M 3 1/2" 3' 1/2" 12ga If anyone wants to help improve the code let me know, and I will stick it on Github.
  13. Bernard

    Delphi 10.4.2 first impressions

    I am worried about missing VCL styles as I use the "Windows 10 Slate Gray" and designed icons to contrast nicely with the colors (not a graphics guy and I spent more time at this than I needed). Can anyone confirm it is in the latest install.
  14. Bernard

    Hex2Binary

    Nice one. 32bit release Pascal lookup (Stefan): 1449 64bit release Pascal lookup (Stefan): 1434
×