CustomGUI tooltips in R14?



  • On 04/03/2013 at 12:08, xxxxxxxx wrote:

    Anyone had issues with the tooltips in R14? I have a plugin and the code generates a custom bitmap button with a tooltip when you hover over the icon in the GUI. The code works just fine in R13 but the tooltips do not show in R14...with no errors or other anomalies reported.

    Code Snippet:
    bc = c4d.BaseContainer()                          ######Create a new container to store the button image 
    bc.SetLong(c4d.BITMAPBUTTON_ICONID1, 1001) #####Sets Button Icon
    bc.SetBool(c4d.BITMAPBUTTON_BUTTON, True)
    bc.SetString(c4d.BITMAPBUTTON_TOOLTIP, "Choose Layout")
    self.myBitButton=self.AddCustomGui(SET_LAYOUT, c4d.CUSTOMGUI_BITMAPBUTTON, "Choose Layout", c4d.BFH_CENTER | c4d.BFV_CENTER, 32, 32, bc)



  • On 04/03/2013 at 13:26, xxxxxxxx wrote:

    hm,

    i prefer ressource based dialogs, because i think it is easier to handle them.
    for those tooltips do work as expected for me in r14, but you will have to make
    sure that the button flag is set for your bitmap button or tooltips won't show up.
    (but this was also the case for r13).

      BITMAPBUTTON IDC_SEARCH
      {
        ALIGN_TOP; ALIGN_LEFT;
        BUTTON; 
        TOOLTIP Search; 
        ICONID1 300000255;
      }
    

    ps : also 1001 seems to be a rather funny ressource bitmap id to me, are you
    sure it is mapped ? i always thought the ressource bitmap ids start in 1000x ish
    region.



  • On 04/03/2013 at 13:38, xxxxxxxx wrote:

    Ferdinand,

    Thanks for your reply!

    I also wanted to make the dialog resource based, but the limitation as I understood it was that I couldn't have multiple GUI layouts that the user could switch between. Not sure if that may have changed since though.

    The resource ID of 1001 is one that I assigned to a custom bitmap icon for the gadget.

    I am just confused why it would work in R13 and not in R14 with the exact same code



  • On 04/03/2013 at 13:45, xxxxxxxx wrote:

    not sure what is meant with multiple layouts, but you can have dynamic dialogs for
    ressource based dialogs. I have a ressource based dialog where the content of 
    a combobox is being filled at runtime. For more complex changes you have either 
    to flush whole (layout)groups or even use subdialogs, but i haven't done that yet.



  • On 04/03/2013 at 13:54, xxxxxxxx wrote:

    Here is the demo video for the plugin, https://vimeo.com/39838253. The bit about the changing layouts is at about 3:30 into it. Maybe that will help :)

    I am not a programmer by trade, so I am not as much of an expert as you :) When writing the current version I was going to, and got about half way through, making it res based but ran into some issues with flushing the layout. Someone here, I think maybe, told me that it was not possible in python as of yet.



  • On 04/03/2013 at 14:35, xxxxxxxx wrote:

    lol, i am everything but an expert ;) i am also just coding for our small inhouse on demand needs
    and privately just for the lulz. for your problem : although this is actually not related anymore to
    your original question, from what i understood you just want to implement a horizontal and
    vertical layout switch. as i said before i have not used subdialogs yet, but i think a possible 
    approach could be this:

    1. create a python based dialog.
    2. add a group.
    3. set the group rows and columns to your needs.
    4. add a subdialog as a child to the group.
    5. load your ressource file into the subdialog.
    6. when the user wants to change the orientation goto 2. flush the group and
    proceed with new column and row values.

    in your ressource file you would have to make sure, that you do not set any fixed
    column or row values, so that the subdialog will always fit into the hosting group.



  • On 04/03/2013 at 14:52, xxxxxxxx wrote:

    Thanks again! Your input is very valuable! I will have to think on that a bit and see if it warrants restructuring the plugin :)

    Now if the darn tooltips would just work in R14! I don't see any changes noted in the SDK about for R14, so one would assume that nothing would be different between the two versions. But, as I was once told "When you assume it makes an ASS out of U and ME" LOL



  • On 04/03/2013 at 16:11, xxxxxxxx wrote:

    as i said, for ressource based dialog bitmap buttons tooltips are working fine for me (in R14).


Log in to reply