How can I setup TListView with CheckBoxes in only certain columns? - delphi

I'm using Delphi 2010, and I am trying to allow the user to select between 2 options per row in a TListView. With TListView, I can set the style to vsReport and enable Checkboxes, but that only gets me 1 checkbox per row. What I need is 2 checkboxes per row...specifically 1 for the 1st column and 1 for the 2nd column.
What I am trying to accomplish is very similar to the standard Windows file security dialog:
Does anyone have any suggestions for implementing something like this using TListView or even MustangPeak's TEasyListView?

Take a look at this
Put a TCheckBox inside a TStringGrid in Delphi
update
The link shows how to draw checkboxes. You can do the same using TListView.OnCustomDrawItem and/or OnCustomDrawSubItem events

I use my own modified version of ExGridView by Roman Mochalov, and full sources for my modified version, plus a demo here (open the Demo in the Demo2 folder) showing checkboxes.

Related

DbLookUpComboBox Dropdown

enter image description hereDbLookUpComboBox Not Working
Im starting a School project and very new in Delphi
I created a form with ADO, ADO connection and ADOQuery controls
I Added the DbLookUpComboBox control to the form
I also setup everything as explained through other guides.
When I run the program, the Combo Box get populated, and I can see all Items from the Access Database.
My Problem is it wont Allow me to select any of the listed Items.
Almost like the Items is disabled in the list
Is there anything Im doing wrong or need to enable to allow me to select items from the combo box
I managed to get the dblookupCombobox to work selecting items using the up and down arrow keys . I s\cant select items using the mouse
I actually figured it out eventually.
I only had to add another ADOQuery and Source.
Then Swop the List field key and datafield around

Adding a column to an Acumatica grid

What is the best way to add a column to a grid in Acumatica? I've looked at the documentation, and I can't seem to find a way to do it.
Thanks
It depends on the type of grid you are using. As an example, lets say you are going to add a CreatedDate column to the details grid of Journal Transactions screen.
You will need to switch to design mode and open up the Aspx Control Tree and select the PXGrid node, click Add, and select Add Column to Grid to open the Add Grid Column dialog.
Find the field you want to add (in this case CreatedDateTime). you can also create new cusomt field here by pressing Add. Pick the correct Column Editor type (like DateTimeEdit) and press OK
move the Column up and down using the left tree to put in position you want.
Validate and publish the project!
If you want to modify existing grid which was created by Acumatica you'll need following steps:
1. Add field in DB ( optional )
2. Add filed description in DAC extension
3. Add column to page in customization engine, or manually imitate behavior of customization engine

Avoid checkbox captions from wrapping in Windows Vista dialogs

For a software project I need to align two additional personalized checkboxes in a microsoft windows vista dialog. I learned about adding checkboxes using Visual-Components and Visualgroups on a CustomizeInterface in delphi.
My Question: What do I need to do with those checkboxes' captions in order to avoid them from wrapping?
1st solution (showing the checkboxes one next to each other):
Dialog.QueryInterface(IFileDialogCustomize, lCustomizeInterface);
if getCheckBox1Caption <> '' then
lCustomizeInterface.AddCheckButton(DWORD(CheckBox1ID), pWideChar(getCheckBox1Caption), Checked1);
if getCheckBox2Caption <> '' then
lCustomizeInterface.AddCheckButton(DWORD(CheckBox2ID), pWideChar(getCheckBox2Caption), Checked2);
2nd solution (showing the checkboxes one below the other):
Dialog.QueryInterface(IFileDialogCustomize, lCustomizeInterface);
lCustomizeInterface.StartVisualGroup(DWORD(1005), pWideChar('Test'));
if getCheckBox1Caption <> '' then
lCustomizeInterface.AddCheckButton(DWORD(CheckBox1ID), pWideChar(getCheckBox1Caption), Checked1);
if getCheckBox2Caption <> '' then
lCustomizeInterface.AddCheckButton(DWORD(CheckBox2ID), pWideChar(getCheckBox2Caption), Checked2);
lCustomizeInterface.EndVisualGroup;
You cannot avoid them wrapping. The IFileDialogCustomize interface offers no functionality to control layout. The control does all of that.
The best you can do is to use a shorter caption if you wish to avoid wrapping onto multiple lines. Or add some extra spaces to avoid the rather nasty mid-word breaks. For instance if you use this text 'Generate expandable / collapsible Excel export' then the outcome is:

How to enable checkboxes in Virtual TreeView columns headers?

I'm using Virtual TreeView V5.0.1 (06 Sep 2012) in Delphi XE2. Setting CheckBox := True on a header column property does not enables the checkbox, so here's the question, how do I enable checkboxes on column headers?
The answer to this seemingly simple question brought a dozen of Google results that tried to hack the header drawing through OwnerDraw and painting checkboxes manually.
Where's the solution I want to share is quite simple, enable following two items in IDE:
include hoShowImages into VirtualTree.Header.Options set and toCheckSupport into VirtualTree.TreeOptions.MiscOptions set.
Then you can enable Header.Column[0].CheckBox property and see desired result.

Intraweb question about improperly working (radiobutton)?

HI,
I created 4 radiobuttons in a intraweb application.
One is checked by default, the rest is not.
The belong to the same group called group. (I set the group properly of each TIWradiobutton)
There is twiimage image which has click event. In that click event, I tried to set the radiobuttons.
E.g.
radiobutton1.checked:=true;
The problem is that this sometimes set the radiobutton and sometimes it does not.
I found a fix by setting the rest of radiobuttons.checked to false. That fixed the problem.
I wonder what I did wrong in the first place when I just used one assignment.
Can you tell me if it is a bug in intraweb or I used radiobutton improperly?
Thanks.
just create a IWRadioGroup1(in iwstanderd pallet ) in your form
select IWRadioGroup1 , in the properties panenel dblclick on items
you will get a stringlist editor ,type the captions of your four radiobuttons line by line then click OK
now select your IWImage1 ,goto click events just type th above code
procedure TformMain.IWImage1Click(Sender: TObject);
begin
IWRadioGroup1.ItemIndex := 2 // 2 is the radiobutton number as you typed in stringlist editor
end;
sometimes IW or components build over the IW (e.g TMS suite for IW) have a strange behavior.you can find how it works by looking out in the code, how they manage the java script behind your radio groups.
Also sometimes you must manage the components exactly how Atozed say in their documentation.
Probably isn't the best answer, but if you'll work a lot with IW you'll see that it has a lots of limitations and strange behavior (only if you don't work in their style, which sometimes differs a lot from win32 style).
best regards,

Resources