- This topic has 10 replies, 2 voices, and was last updated 13 years, 10 months ago by JM-DG.
-
AuthorPosts
-
January 12, 2011 at 9:32 pm #34261JM-DGParticipant
I manage manually the visibility of my columns for my TsListView.
I hide the columns by giving them a width of 0.
Because my columns are resizable I need to prevent the user of resizing the “hidden” columns.
I intercept the resizing messages.
Code:procedure TMediaLibrary.ListViewNewWndProc(var Msg: TMessage);
var
hdn: ^THDNotify;
begin
if Msg.Msg = WM_NOTIFY then
begin
hdn := Pointer(Msg.lParam);
if ((hdn.hdr.code = HDN_BeginTrackW) and (LvPlaylist.Column[hdn.Item].Width = 0)) or
((hdn.hdr.code = HDN_BeginTrackA) and (LvPlaylist.Column[hdn.Item].Width = 0)) then
begin
Msg.Result := 1;
end else
begin
FListViewOldWndProc(Msg);
end;
end
else
FListViewOldWndProc(Msg);
end;Now what I want to do is remove the change of the cursor when the mouse hovers a “hidden” column.
Because currently it changes to a crHSplit cursor even if the column has a width of 0.
Thanks!
_______
JM-DG
January 13, 2011 at 11:00 am #44457KSSParticipantHello! Perhaps this component is suitable for your task – TacListView 🙂
It has TacColumn.Visible property.
January 17, 2011 at 1:19 am #44473JM-DGParticipantWow, Thank you!
It looks like it is what I need 😀
++
________
JM-DG
January 17, 2011 at 4:04 am #44474JM-DGParticipantIt seems that this component does not allow the resizing of the columns…
I need this feature too… 🙂
Thanks!
______
JM-DG
January 17, 2011 at 6:38 am #44475KSSParticipantUser can change column size by mouse and you can change it by TacColumn.Width property.
January 18, 2011 at 3:45 am #44480JM-DGParticipantSorry, I meant reordering of the columns… 😀
Did I missed something?
January 18, 2011 at 7:29 am #44487KSSParticipantNo, you had not missed anything 🙂 Columns reordering is not supported now, but this feature will appear in one of next component release 😉
January 18, 2011 at 7:52 pm #44495JM-DGParticipant'KSS' wrote:No, you had not missed anything 🙂 Columns reordering is not supported now, but this feature will appear in one of next component release 😉
Keep me informed. 😀
Thanks a lot for your work!
_______
JM-DG
January 19, 2011 at 8:00 am #44504JM-DGParticipantHo! One last question…
Is it possible to get the row information when clicking on it?
Example: Retrieve the information of the 3rf column of the 2nd row clicked.
January 27, 2011 at 4:35 pm #44639KSSParticipant'JM-DG' wrote:Ho! One last question…
Is it possible to get the row information when clicking on it?
Example: Retrieve the information of the 3rf column of the 2nd row clicked.
You can get Element object “TacListView.GetElementAt(MousePos: TPoint)”. See a new version of component with columns reorder on forum.
January 29, 2011 at 6:37 pm #44663 -
AuthorPosts
- You must be logged in to reply to this topic.