ComboBox child with icons in .res based dialog

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

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?

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

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&";

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 !

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.

:slightly_smiling_face:

Jim

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"