Interdependent EditNumber Gadgets?



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

    On 06/01/2005 at 01:26, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.012 
    Platform:   Windows  ;   
    Language(s) :   C.O.F.F.E.E  ;  C++  ;

    ---------
    I have three EditNumber elements in a modal dialog. Two represent a frame range (i.e.: 0(min)-90(max)), and the other represents a step value (every nth frame).

    Initially, it is easy to set the limits. The step value is limited from 1 to max. But if the min or max is changed, I need to reset the step limit accordingly (so that it is not greater than max-min. I understand that I should use GeModalDialog::Message(), but how? As numbers are typed, the limit does not follow. What I really need to know is how to determine when entry is complete or follow it properly. I want these limits set while the dialog is opened, not after close.

    Thanks,
    Robert



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

    On 06/01/2005 at 07:41, xxxxxxxx wrote:

    Oh, and that's supposed to be C++ only! ;)



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

    On 07/01/2005 at 11:33, xxxxxxxx wrote:

    I found a solution, albeit rather ugly. ;)

    Since the only messages you get with the gadget ID are as the text is entered, CLEAR_FOCUS is used instead to call a method to check and correct all values according to these necessary limits - I can at least partially guarantee that entry is complete.

    CheckValueRanges(), how do I put it, sucks. It works in just the way that I wouldn't want. I cannot use it and check the values on the way out of the dialog as well (with OK) - it either closes the dialog anyway (despite my and its protestations) or won't let it close at all. What use is this method? At least my method works both ways - interactively and during close.

    Robert


Log in to reply