11/8/2022 0 Comments Delphi fmx grid![]() ![]() #Delphi fmx grid windows#This is one reason it took us so long to deliver the product (this of course is not the only reason).Īs much as we would have liked to port the QuantumGrid to FM, our VCL Grid relies too heavily on GDI/GDI+ and low-level Windows API calls. It has been designed and optimized for FireMonkey and cross-platform development. #Delphi fmx grid code#Our FMX Data Grid is not a port of the ExpressQuantumGrid – it is an entirely new product with an entirely new code base. Ok – with that disclaimer out of the way, let’s get into it and take a closer look at our FMX Grid. We’ll certainly work with you and do everything reasonable to improve the Grid over time. We don’t have any magic bullets in this regard. We also want to make it clear that it’s going to take time for our FMX Data Grid to reach the level of maturity of its VCL counterpart. The marketplace will ultimately decide what happens next – if everyone moves to FireMonkey, we’ll be sure to follow. Our current goal is to ship as many features as humanly possible for a few key products. #Delphi fmx grid full#Yes, we want to have a full FMX product portfolio, but we would be telling a lie if this is in the cards. Though we want to include every single VCL product and include every single VCL feature in our FMX offering, we have limited resources and are always short on time. Before we get into the details, a quick word or two about the role FMX will play in our Delphi/RAD Studio product strategy. As always, comments welcomed.Yes, this is not a misprint – our FMX Data Grid is finally available for download. Since the developer provides the code (and hence determines the algorithm used for sizing) it can easily be modified to suit any need or preference. This solution requires a bit of code but seems to be flexible, reliable and relatively easy to implement. (This insures that the columns are correctly set immediately after the dataset is activated.) By the OnActivated event of the LiveBinding for the String Grid.By the OnResized event of the string grid itself.Invoking the Column Width CalculationĬolumn width calculation is invoked in two places: The value finally determined is used to set the column width. Finally, the calculated value for the column is constrained by the specified minimum and maximum values for the column.Next, each column is handled by first calculating the proportional value of the available space using the column's proportion specification as the numerator and the previously calculated denominator.This sum is used as the denominator for individual column calculations. The calculation starts by summing all of the proportion values for the column array.Proportion of total space available in the string grid for each column.It uses a two-dimensional array of constants that specifies the parameters for each column: The routine CalcColumnWidths in the main form does the actual work of calculating and specifying the column widths for display. What remains is the handling of the column resizing, which cannot be specified directly. The TStringGrid is simply handled as a child of one of the TLayouts.Īt this point the form will behave in a responsive manner, observing the various specifications for absolute or percentage sizes as the form itself is resized. In one case I nested another TGridPanelLayout in the target cell to permit further responsive behavior. Inside each cell of the TGridPanelLayout I placed a TLayout to enable grouping several visual components in a single TGridPanelLayout cell. In this case, my standard practice is to use one or more TGridPanelLayout components to divide the form into the desired regions. Ways to make a FireMonkey form responsive are generally well-known. The sample code with comments is the best source of how the Responsive Columns were implemented. ![]() Note that the sample project is quite simple but the code for string grid column resizing is heavily commented. #Delphi fmx grid download#There is a sample project for this blog post available for download at Responsive FireMonkey Grid on GitHub. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |