I am using a TStringGrid which is placed on a popup (TPopup). when the user click a button the popup will appear with the stringGrid. user will then insert some data in the cells then clicking an apply button on the popup which will update a data array.
the popup is used as a metro style flyout as per firemonkey sample.
the problem is that the string grid appears put when trying to edit a cell it doesn't accept any input from the key board.
Any idea how to solve this problem. I am using Delphi XE5.
Related
Is there a way to add some buttons to the selected ListBoxItem by adding these buttons to a style which is being used for the selected item?
I didn't yet find a suitable style FMX uses to display the selected item.
My goal is to have some buttons on the selected item with context based functionality. While I can do this by reparenting a TButton created in code in the OnPaint event of the ListBox, this works for Android but not for Win32 as it is being overpainted by the selection.
Other solutions like doing this in OnItemClick or OnClick are sluggish or only work properly on Win32 but not on Android and would need to be put into a timer fired on click.
I have a grid with a CheckColumn connected through livebindings with a query. When i open my query all my data is loaded into grid, but the checkbox do not show. If i click on the grid then the checkbox appears.
Picture when i open my query:
When i click on the grid:
I discovered that using gridItens.Content.Repaint Redraw the checkboxes, for now I'll keep it that way, but I'll take a look at this component #Alberto Miola!
I'm using Delphi 10.1 for developing android mobile application. And I'm having two form: Form-A and Form-B. Form-A contains the button and Form-B contains panel with the text. And When I clicks the Form-A button, it should show the Form-B. At that time Form-A should become dim. How can I able to implement this? Please help me.
I do this with a TRectangle placed on the form I want to dim, set it's Align property to Contents, then set its Fill property and Opacity to achieve the desired amount of dimming.
Trying to get a new style on a ComboBox in FireMonkey (XE2).
But for some odd reason I cannot get the text of a ListBoxItem to show.
What I've tried is the following.
Create a new FireMonkey HD Application.
On the form I've added a ComboBox.
Right click on the ComboBox and select 'Edit custom style'
There I've added the following components
while the original one consist out of the following components
Now it seems to me that I need the TContent object (but I can't seem to find it in the toolpallete)
How can i bind my Text object to the strings that are placed in my ComboBox?
Any pointers are very welcome.
FireMonkey doesn't use a TText object to display the text. Instead it creates a copy of the list box item within the TContent (if I remember correctly).
As you've worked out you need to add a TContent to your form. The easy way to do this is to
go back to the form,
right click and select View as Text
Find the TStyleBook object and add a TContent at the appropriate point (the format for this should be obvious from the rest of the file).
No need to add any properties - defaults will be used the first time.
Right click, View as Form.
Go back into the style editor and edit away.
I have a Delphi 6 application that has a TJvListView control. I have a popup menu tied to that control via the control's PopupMenu property. What I would like to do is show a different popup menu based on which column the user had the mouse over when they right clicked, with the additional option to not show a popup menu at all if the current column does not need one. How can I do this?
Thanks to this detailed sample by Remy Lebeau on in-place editing in a TListView I know what row and column the mouse is over except for one wrinkle. The mouse down event where I determine the current row and column occurs after the popup menu is exited.
I now need to know two things. First, how can I get some event to fire before the popup menu shows after a right mouse click so I can record the current list view row and column and suppress the popup menu if I want to, and second, how I can show a different popup based on the current column. I am hoping to avoid having to write a bunch of mini-forms instead of using the TListView PopupMenu property and supporting code. Is there a simple solution, perhaps some fancy footwork in a sub-class I should create around TJvListView?
You could perform the detection in mousemove instead of mousedown/Click and change the popupmenu depending.
You also could remove any popupmenu and call the wished via p.pupup in mousedown as you desire.