DELPHI : String grid header background/font color - delphi

I've created a string grid with a certain amount of columns and rows. I've also handle a right clic event on the string grid which displays a popup menu when you clic on the right button. You have some options inside this popup menu.
My question is how do i change background or police font color of a cell when i select an option from my popup menu. I know we can get the selected col using stringGrid.Col and same for the row, and i also know we ca change color on draw cell event. But i want to change the color on user action only.
For example, in my table i open up a file and i load the file content into a string grid (it's a CSV file). This file will be modified in my application from the string grid and then exported to a databse. An user can select a particular col with the right clic and then press primary key or foreign key or any other option. When he selects primary key, for example, i want to change the color of the column header so he can know which clumn is the primary key, which is the foreign key and so on. See what i mean?
PS: I am using delphi 2006 and can't change to another version.
PS: i've searched for a delphi forum on stackoverflow/exchange but didn't find the correct forum i guess

Paint the background in the desired colour in an OnDrawCell handler as you currently do.
When you need to change colours, in response to user action, force a paint cycle by calling Invalidate on the grid.
If for some reason you don't want to invalidate the entire control, calculate the rectangle that needs to be re-painted and pass it to InvalidateRect.

Related

Power Automate Desktop Fill Data from excel to website but multi UI ELEMENT

I am a newbie working on power automate desktop and sorry if my english is not good. Currently I am making a flow that will populate the website from my excel. Excel I will have a list of lists I want it to populate in order. But I am having a problem that when I finish filling in the first position, it will show the second position and go on to third , ..... The HTML Input ID also changes in ascending order. So when I do this Flow, it only executes at the top of all my list from excel. Is there a way that can automatically jump the column according to that line UI element. Thank you
enter image description here
Input text will increase like adGroupInfo.1.adcontent and then you fill that one it will show your second and i want to fill data from my excel to that it will be adgroupInfo.2.adcontent
enter image description here
It same all DIV, SPAN ,But different Input ID
enter image description here
enter image description here
For this you will make use of a variable.
Dummy data:
Navigate to the element in the element list.
The click on the 3 dots menu to see the options.
Select Edit
Then scroll down to the enabled selector, this will in most cases be the id of the element on the web page.
replace the value with the name of the variable that will hold the control id value
Then in your loop assign the value of the UI element to the variable you used as the identifier.
Line 7 (red 2)
This should then fill the boxes as required.

Increase/Decrease a field in OpenOffice Calc

I'm trying to count (and sum up) different (physical) items and input those counts in a spreadsheet. Is there a way to increase (or decrease) an integer in a field in OpenOffice Calc? Mouse or keyboard input.
Either a shortcut+macro combination or something along the lines of these (fictive) arrows:
i.e. pressing up would increase the field to value 43
In fact I would be happy for any suggestion for an open programme that would digitalize such input and produce some sort of csv or similar output.
Via View - Toolbars - Form Controls get the toolbar Form Controls visible.
There you have Spin Button control (see tooltips).
Insert this on the sheet by clicking it and pull the size of it with the mouse. Pull it longer than width.
Right click the control and select Control... from the context menu.
On the Data tab set the Linked cell to A3 for example.
Now switch the design mode to off by clicking the corresponding button at the toolbar Form Controls (see tooltips).

ALV tooltip in a single cell of a row. Possible?

It is possible to put a tooltip on a single cell of my alv? I know that it is possible in a column by a field catalog, but what about single cell?
I have ALV with icon like that, which is called via cl_gui_alv_gridv
I want information about this item in tooltip when I hover mouse over this icon
The information on how to display a symbol with a tooltip is easily available if you google for "site:help.sap.com tooltip icon". Since you seem to be unable to find it, here is the actual link. Make the target field large enough (132 characters is a common size), then use the function ICON_CREATE.
If you don't want an icon to appear, you can use ICON_SPACE. And since the tooltip is contained in the value of each cell, of course it is possible to have different tooltips for different cells.

Simple question, value not being display in DevExpress's LookupComboBox

This is a Delphi project, but I suspect DevExpress's component works similar for Delphi and .NET.
I have a DevExpress GridDBTableView, when selecting a cell in one of the column, I want a LookupComboBox to show up, where user can select an item, and the value gets display in the table cell. Simple.
I've set the column's Properties set to 'LookupComboBox'.
I have ListColumns setup with 'LocationName' and 'QuantityOnHand'.
ListSource is set to a datasource that's linked a dataset of 'LocationID', 'LocationName', and 'QuantityOnhand'.
ListFieldNames is set to 'LocationName;QuantityOnHand'
When I click on the cell, the combo box shows up with locations for me to choose, but when I choose a location, the table cell doesn't show the location name. In fact, I can't type anything in the cell.
What am I missing?
Ideally, I would like to be able to select a location from the combo box, the location name shows up in the table cell, and I can somehow store the corresponding LocationID that was selected.
I think that you should also set the column's Properties.KeyFieldName property to the KeyField of the Lookup DataSource. In this case, everything should work properly.
OK, all the answer is in the Express Editors' help file article 'Using Lookup Editors'.
The only step I missed was setting the LookupComboBox's KeyFieldNames property to 'LocationID'.

how can i make a TRibbonComboBox act like a TCombobox with Style of csDropDownList?

how can i make a TRibbonComboBox act like a TCombobox with Style of csDropDownList? we don't want the user to be able to edit the choices in the list.
we need to use TRibbonComboBox because we want the current selection to be visible.
Microsoft word shows a combobox where you can select an item but cannot edit the item itself.
should i consider trying a TCombobox in the ribbon? i'd expect it won't look or not work correctly.
thank you for you comments!
You can just use TRibbonComboBox.ReadOnly:
Determines whether the user can change the text of the edit control.
And furthermore:
Setting ReadOnly to true ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the Clipboard.
(see documentation)

Resources