taofor.blogg.se

Dbgrid component delphi
Dbgrid component delphi













dbgrid component delphi
  1. DBGRID COMPONENT DELPHI HOW TO
  2. DBGRID COMPONENT DELPHI FULL
  3. DBGRID COMPONENT DELPHI CODE

(Sender: TObject const Rect: TRect DataCol: Integer īegin if (THackDBGrid(DBGrid1).DataLink.ActiveRecord + 1 =

DBGRID COMPONENT DELPHI CODE

Now, to enhance the user experience, we'll highlight the active row … this trick will allow us to have the code that changes the appearance of the row behind the mouse cursor:

dbgrid component delphi

Having the code above, when you move the mouse over the grid, the selected record is the one displayed in the grid "below" the mouse cursor – no need to click the Grid to change the current record. Hopefully, to access such protected members of a component, a simple technique called the "protected hack" can be used. Many Delphi components have useful properties and methods that are marked invisible ("protected") to a Delphi developer. The Row property of a TCustomDBGrid component holds the reference to the current active row. Note 2: In order to correctly set the active record, we need to hack a DBGrid and get our hands on the protected Row property. The idea is to locate the record the mouse is hovering over, make this record active and highlight the corresponding row in a DBGrid.

DBGRID COMPONENT DELPHI HOW TO

What you will find in this article is how to enable the "OnMouseOver" type of event for a row in a DBGrid. Recall that when dgRowSelect is included in Options, the dgEditing flag is ignored and editing data using the grid is disabled, thus leaving you with a DBGrid that is not-editable. One could say "nothing easier, just set dgRowSelect in Options property and off you go", but would go off the wrong track. I've received many email messages from Delphi developers (beginners as well as experts) asking about highlighting a row in a DBGrid component – and at the same time enabling a user to edit data using the grid.ĭon't get fooled about this question. For example, adding color to your database grids will enhance the appearance and differentiate the importance of certain rows or columns within the database. Designed to enable a user to view and edit data in a tabular grid, the DBGrid provides various ways of customizing the way it represents "its" data. Now I would like to have an exe that runs without HTML, PHP.The TDBGrid Delphi component is one of the jewels of the VCL. Program is still used and runs now for more than 15 years. So we talk about 35 MP or higher, ✒00Kb and ☖Kbįor the moment I own about 130.000 images and I once wrote a program to maintain, order, tag.

DBGRID COMPONENT DELPHI FULL

One with full size, one with a 1024-768-base and one with 250-250-base. Of course, the select has his limitation where I only permit a max of 100 images. Tho construct the real path, I have just to choose between originals, slides or thumbs. When looking to the reall image (can be 36 MP) I use the original option. When creating a full-screen-image I uses the slide-option When creating a overview in a grid, I use thumb-presentation However, on the harddisk I have 3 similar directory In the database resides only a n image-name and a part of the directory where resides the photo. That's why I always keep all photo's outside the database. It will be lot of work, but this something I know. When the dataset scrolls the grid should delete the images attached to inivisible records and load only those visible. When you want to draw a cell you should look whether an already reduced image exists in the cache and load it from there, otherwise you should stretchdraw the image to another cached file. Whenever you load an original image stretch-draw it and save the reduced image to a cache folder. If the dataset has many rows you should set up a cache for the size-reduced images. A 300x200 uncompressed image (0.24MB) is much smaller than the original many-megapixel file and is already decoded. I'd write the stretchdrawn image to a Bitmap and use this to display the images.

dbgrid component delphi

Whenever you drag another window over your dbgrid or you drag the grid out of the visible desktop area the required repaint will have to reload the original images. You are talking of a "fotostream" and probably have the huge >20 mega pixel photos in mind - this will always be slow even if you use a memory stream because you must read the file and decode the jpeg.















Dbgrid component delphi