![]() |
#21
|
|||
|
|||
![]()
You may also find useful to search VST for a particular data. For example, you want to select a node, where column "Name" it's equal to a specific value:
Code:
function TForm1.FindNode(const AName: String): PVirtualNode; var Node: PVirtualNode; Data: PData; begin Result := nil; Node := VST.GetFirst; while Assigned(Node) do begin Data := VST.GetNodeData(Node); if UpperCase(Data.FName) = UpperCase(AName) then begin Result := Node; Break; end; Node := VST.GetNext(Node); end; end; procedure TForm1.Button1Click(Sender: TObject); var Node: PVirtualNode; begin Node := FindNode('test 4'); if Node <> nil then begin VST.Selected[Node] := True; VST.FocusedNode := Node; end; end; |
#22
|
|||
|
|||
![]() Quote:
It has more data than the VST columns: Code:
VMentry = record Name: WideString; Ptype: Byte; ModeLoadVM: Byte; VMID: WideString; VMName: WideString; VMPath: WideString; ExeParams: WideString; FirstDriveName: AnsiString; FirstDriveFound: Boolean; FirstDriveBusType: Byte; SecondDriveName: AnsiString; SecondDriveFound: Boolean; SecondDriveBusType: Byte; InternalHDD: WideString; CDROMName: WideString; CDROMType: Byte; Memory: Word; Audio: Byte; Run: Byte; Priority: Byte; luIDS: LastUsedIDS; VBCPUVirtualization: Byte; end; |
#23
|
|||
|
|||
![]()
I don't see the problem:
Code:
PData = ^TData; TData = record Name: WideString; Ptype: Byte; ModeLoadVM: Byte; VMID: WideString; VMName: WideString; VMPath: WideString; ExeParams: WideString; FirstDriveName: AnsiString; FirstDriveFound: Boolean; FirstDriveBusType: Byte; SecondDriveName: AnsiString; SecondDriveFound: Boolean; SecondDriveBusType: Byte; InternalHDD: WideString; CDROMName: WideString; CDROMType: Byte; Memory: Word; Audio: Byte; Run: Byte; Priority: Byte; luIDS: LastUsedIDS; VBCPUVirtualization: Byte; end; Last edited by kolbasz; 12-04-2015 at 10:52 AM. |
#24
|
|||
|
|||
![]()
Sorry for the delay in response, but I had a lot of work to do (this project and in my personal life).
I'm just at half with the implementation of VirtualStringTree. Many things have to be changed so it would be 100% functional. A question: The header in the TListView ver 6 and in the TVirtualStringTree is far less "visible" than in TListView 5.8 ver. I think the Windows theme is contributing too... It's flat like the rows, its color is just a bit different than the row color and the margins are very thin and/or painted with an almost invisible color. It's not so easy to realize there is a header there ![]() Is there a way to make it more "visible" but still letting the Windows theme to change it? Maybe by making again tridimensional, or by using an OnAfter event to repaint it with a slightly darker color. LE: found this, maybe it's good xD Last edited by DavidB3; 12-05-2015 at 02:49 PM. |
#25
|
|||
|
|||
![]() Quote:
Quote:
|
#26
|
|||
|
|||
![]() |
#27
|
|||
|
|||
![]() Quote:
![]() Quote:
@DavidB3 I have a request!. ![]() After you finish the implementation, please replace the icons with png's. Although TImageList theoretically supports PngImages, in reality that's not true. You should download PngComponents(https://github.com/TurboPack/PNGComponents) and replace TImageList with TPngImageList. You don't have to change a single line of code, it looks and works exactly like TImageList, but it has full png support. The problem is, those icons in your application looks ugly(take this as constructive criticism) : ![]() You can download a lot of free Png icon set from the net. |
#28
|
|||
|
|||
![]()
I made the header code a little more "adaptable":
Code:
//global var ColorToBlend: TColor = clBlack; isBlendColorAssigned: Boolean = False; ........... function GetColorToBlend(const BaseColor: TColor): TColor; procedure MinMax3(const i, j, k: Integer; var Min, Max: Integer); begin if i > j then begin if i > k then Max := i else Max := k; if j < k then Min := j else Min := k end else begin if j > k then Max := j else Max := k; if i < k then Min := i else Min := k end end; var MinValue: Integer; r, g, b, c, v: Integer; begin c := ColorToRGB(BaseColor); r := GetRValue(c); g := GetGValue(c); b := GetBValue(c); MinMax3(r, g, b, MinValue, v); if v <= 127 then Result := clWhite else Result := clBlack; end; ........... Alpha := 15; ........... if not isBlendColorAssigned then begin isBlendColorAssigned := True; ColorToBlend := GetColorToBlend(PaintInfo.TargetCanvas.Pixels[(R.Right - R.Left) div 2, (R.Bottom - R.Top) div 2]); end; ColorBlend(PaintInfo.TargetCanvas, R, ColorToBlend, Alpha); I know some of the icons look ugly but so far couldn't find better ones. Yes, on internet you can find a lot, but most of them are highres and look very bad in 16x16. Using png won't improve their look, just the memory usage. But the difference will be too low to worth. I know those components, I used them a lot in other apps. Unfortunately they aren't compatible with D10 (25 compilation errors)... Last edited by DavidB3; 12-06-2015 at 10:52 AM. |
#29
|
|||
|
|||
![]()
Ok, you don't like png's, it's perfectly fine, but even after five minute of google search you can find better looking icons(ico).
![]() |
#30
|
|||
|
|||
![]()
It makes no difference for me if they are bmp, ico, png or anything else.
Like I said, I chose ico because it was the ONLY WAY to load them without losing something from image. In the Delphi 7 version I had bmp because, same, was the ONLY WAY to load them and show them correctly. In my other apps I used pngs stored in resources and loading them using those components. Have you looked where I said "25 compilation errors"? Btw, the latest versions of Delphi can load pngs. I tried load png into a TPNGImage then into a TBitmap and then in TImageList. But the images were shown grayed. And I spent countless hours looking in the hundreds of thousands icons on internet. Like I said, most of them look crappy in 16x16 res. And english in not my native language so I don't know all the word "variations" so I can search them. LE: for "not found" (red circle) I found this one: https://www.iconfinder.com/icons/144...t_icon#size=16 But I'm not sure is much better. Last edited by DavidB3; 12-06-2015 at 12:04 PM. |
![]() |
Tags |
64 bit, delphi 10, delphi 7, listview |
Thread Tools | |
Display Modes | |
|
|