Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    ComboBox child with icons in .res based dialog

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 742 Views 1 Watching
    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 Offline
      Helper
      last edited by

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

      On 04/12/2012 at 18:59, xxxxxxxx wrote:

      Hi again guys..

      I know how to get an icon loaded for a child item of a combobox when using GeDialog:

      self.AddComboBox(prof_combo, c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT, inith=20)
      self.AddChild(prof_combo,prof_circle,"Circle&i"+str(c4d.OBJECT_SPLINECIRCLE) + "&")
      self.AddChild(prof_combo,prof_square,"Square&i"+str(c4d.OBJECT_SPLINERECTANGLE) + "&")
      

      but I can't figure out how to get the same behavior using a .res dialog file:

      COMBOBOX prof_combo
              {
                ALIGN_TOP; ALIGN_LEFT; SIZE 150, 0; 
                CHILDS
                {
                  0, PROF_CIRCLE;
                  1, PROF_SQUARE; 
                  2, PROF_NSIDE; 
                  3, PROF_STAR; 
                  4, PROF_FLOWER; 
                  5, PROF_CUSTOM; 
                }
              }
      

      whats the right way of doing it ? 
      Cheers

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

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

        On 05/12/2012 at 01:50, xxxxxxxx wrote:

        Hi Massimiliano,

        The declaration of the COMBOBOX seems correct in your .res for the dialog.
        Are prof_combo (should be renamed as ID_PROF_COMBO according to CINEMA naming convention), PROF_CIRCLE, PROF_SQUARE etc. (should be renamed to IDS_PROF_CIRCLE, IDS_PROF_SQUARE etc.) declared in c4d_symbols.h?
        And do you define the strings identifiers in a .str in strings_xx/dialogs?

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

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

          On 05/12/2012 at 04:18, xxxxxxxx wrote:

          Hi Yannick,
          yep sorry, I stripped out all the other lines just to focus on the combo. The dialog works good in both cases, I got all the resources from ResEdit, so all the IDS are declared in c4d_symbols.h and strings. I just can't get the same icons in .res based dialog:

          geDialog version:
           

          res_based:

          The dialogs are for two separate things, I'm not mixing 'em up, just trying to recreate the same(ish) dialog based on .res. Hope this will clear up things a bit better 🙂

          cheers

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

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

            On 05/12/2012 at 05:32, xxxxxxxx wrote:

            How do you define the strings in the .str file?

            They should include the icon ID literal value (not the ID name i.e. c4d.OBJECT_SPLINECIRCLE and c4d.OBJECT_SPLINERECTANGLE) :

            IDS_CIRCLE "Circle&i5181&";
            IDS_SQUARE "Square&i5186&";
            
            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

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

              On 05/12/2012 at 06:08, xxxxxxxx wrote:

              Ahhh, ok, I see. I have to set the icon ID in the strings, not the dialog.res 🙂 
              That's not exactly obvious (for noobs like me), maybe the SDK should repor it..for GeDialogs.AddChild() too, as icons are not even mentioned 🙂
              Thanks for your help an time !

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

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

                On 05/12/2012 at 10:16, xxxxxxxx wrote:

                Tricks, fwiw, you have a typo in your gui. I know it's not your priority in this post, but I thought I'd just give you a heads up.

                🙂

                Jim

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

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

                  On 05/12/2012 at 10:32, xxxxxxxx wrote:

                  Ouch, thanks 🙂 I hate that "th"

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