Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    ListView

    SDK Help
    0
    3
    296
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 04/08/2005 at 21:39, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello ...

      Have you ever used a listview without using the resource file ...
      If so ... please take a look at my code ... It's not working the way I hope ... I took the ListView.cpp of Cinema4D as an example and coded(copied) like that ...

      SimpleListView listview1;
      BaseContainer layout;
      BaseContainer data;

      layout.SetLong('name',LV_COLUMN_TEXT);
      listview1.SetLayout(1,layout);
      for(i=0;i<5;i++)
      {
              data.SetString('name',"AAA"+LongToString(i));
           listview1.SetItem(10+i,data);
      }
      listview1.DataChanged();
      AddListView(1212,0,100,30);
      listview1.AttachListView(this,1212);

      Nothing is shown in the dialog ... only the border ...
      What's still needed to do that ...

      With all my respects ...
      ZawMinTun

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 04/08/2005 at 21:46, xxxxxxxx wrote:

        A sparse example of my code, you can see that the ListView must be added and attached to the Dialog before setting it up further. CreateLayout() is called before InitValues() whenever the dialog is opened.

          
        CreateLayout()  
        {  
        ...  
             AddListView(IP_SET_RUNTIMELIST, BFH_SCALEFIT|BFV_SCALEFIT, 0, 128);  
             runtimeListView.AttachListView(this, IP_SET_RUNTIMELIST);  
        ...  
        }  
          
        InitValues()  
        {  
        ...  
             BaseContainer layout;  
             layout.SetLong('chck',LV_COLUMN_CHECKBOX);  
             layout.SetLong('name',LV_COLUMN_TEXT);  
             runtimeListView.SetLayout(2, layout);  
        // *** Add your list items here ***  
             // Update RuntimeList after Settings loaded  
             runtimeListView.DataChanged();  
        ...  
        }  
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 05/08/2005 at 00:37, xxxxxxxx wrote:

          Right!!!!!!!!!!!!!
          Thanks a lot ...
          Now it works ...

          May the good lord bless you always ...
          With all my best wishes ...
          ZawMinTun

          1 Reply Last reply Reply Quote 0
          • First post
            Last post