TsListView

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #34261
    JM-DG
    Participant

    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

    #44457
    KSS
    Participant

    Hello! Perhaps this component is suitable for your task – TacListView 🙂

    It has TacColumn.Visible property.

    #44473
    JM-DG
    Participant

    Wow, Thank you!

    It looks like it is what I need 😀

    ++

    ________

    JM-DG

    #44474
    JM-DG
    Participant

    It seems that this component does not allow the resizing of the columns…

    I need this feature too… 🙂

    Thanks!

    ______

    JM-DG

    #44475
    KSS
    Participant

    User can change column size by mouse and you can change it by TacColumn.Width property.

    #44480
    JM-DG
    Participant

    Sorry, I meant reordering of the columns… 😀

    Did I missed something?

    #44487
    KSS
    Participant

    No, you had not missed anything 🙂 Columns reordering is not supported now, but this feature will appear in one of next component release 😉

    #44495
    JM-DG
    Participant
    '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

    #44504
    JM-DG
    Participant

    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.

    #44639
    KSS
    Participant
    '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.

    #44663
    JM-DG
    Participant

    OMG Thank you soooo much!

    Now everything I need is included in your component.

    Later!

    _______

    JM-DG

    'KSS' wrote:

    You can get Element object “TacListView.GetElementAt(MousePos: TPoint)”. See a new version of component with columns reorder on forum.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.