How to enable checkboxes in Virtual TreeView columns headers? - delphi

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.

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

How can I add text to a work item

We have a few bugs and change requests which have a complicated iteration path. This results in people coming over the team to ask 'Where do we raise items' a lot.
As you can't set a default value for the iteration path in TFS 2010 we think the best solution would be to add a string of text under the field which we can manually update every 7 weeks with the correct area to raise items in.
However TFS doesn't seem to allow just a line of text on its work items as a control. Is there a way to add a line of display text i.e. Not a field you edit, but just to inform those writing the items?
Please note that it needs to be visible at all times, using the tooltip 'help text' field on a control is not enough in this case.
You can use the LabelControl for this purpose.
You can not have a default in the work item for the iteration path, but what you can do is making use or the template url in web access or the work item templates in the power tools to create a work item that is prepopulated with values.
What about a custom field with a display control in read-only? You can give a default value to the field and the "read-only" control prevent other to change it.

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

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.

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,

Multiple Column headers lines in dxDBGrid in Delphi?

Users are wanting a grid to have multiple lines in the column header, and I am not finding a solution.
Anybody have any suggestions?
Have you tried the HeaderMaxLineCount property of the TdxDBGridColumn?
Additional information:
When you use the cxGrid component from devexpress you have to set the HeaderAutoHeight property to true (of cxGridDBTableView).

Resources