Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/01/2005 at 10:10, xxxxxxxx wrote:
User Information: Cinema 4D Version: 8.5 Platform: Windows ; Language(s) : C++ ;
--------- hi,
i have a dropdown item in my dialog. depending on the selection, different dialog items should be hidden or shown.
it works fine, but the items are only shown/hidden, when i press another button or slider or anything like that.
is there a possibility to update the property dialog ? direct after selecting something out of a dropdownmenue ?
sorry for my bad english, but i hope you understand, what i need to know
best regards
On 10/01/2005 at 10:39, xxxxxxxx wrote:
Hi,
where are you modifying the elements? Is this is a "usual" dialog or are you talking about the Attributes Manager?
In a dialog you need to rebuild the group the elements are in. There´s an example in the SDK if I remember right.
For the AM, all you need to do is overloading GetDDescription and show/hide the elements in there. The AM will automatically update.
Some code snippets would surely help.
On 10/01/2005 at 11:23, xxxxxxxx wrote:
> if (stmode == 3) > { > BaseContainer* bc = description->GetParameterI(DescLevel(CARRIER_DISTANCE), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, FALSE); > } > bc = description->GetParameterI(DescLevel(CARRIER_WIDTH), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, FALSE); > } > } > if (stmode == 2) > { > BaseContainer* bc = description->GetParameterI(DescLevel(CARRIER_WIDTH), ar); > bc = description->GetParameterI(DescLevel(CARRIER_WIDTH), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, FALSE); > } > } > if (stmode == 1) > { > BaseContainer* bc = description->GetParameterI(DescLevel(BASE_THICKNESS), ar); > bc = description->GetParameterI(DescLevel(BASE_THICKNESS), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, TRUE); > } > } > if (stmode == 4) > { > BaseContainer* bc = description->GetParameterI(DescLevel(BASE_OUTSIDE_WIDTH), ar); > bc = description->GetParameterI(DescLevel(BASE_OUTSIDE_WIDTH), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, FALSE); > } > bc = description->GetParameterI(DescLevel(BASE_OUTSIDE_HEIGHT), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, FALSE); > } > } > if (mode == 1) > { > //Second Level Group einblenden > BaseContainer* bc = description->GetParameterI(DescLevel(ID_SECOND_LEVEL_GROUP), ar); > bc = description->GetParameterI(DescLevel(ID_SECOND_LEVEL_GROUP), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, FALSE); > } > } > if (mode == 2) > { > BaseContainer* bc = description->GetParameterI(DescLevel(ID_MULTIPLE_FLOOR_GROUP), ar); > bc = description->GetParameterI(DescLevel(ID_MULTIPLE_FLOOR_GROUP), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, FALSE); > } > } > if (dir == 0) > { > BaseContainer* bc = description->GetParameterI(DescLevel(SL_SPACE_GAP), ar); > bc = description->GetParameterI(DescLevel(SL_SPACE_GAP), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, TRUE); > } > > } > if (advgap) > { > BaseContainer* bc = description->GetParameterI(DescLevel(ID_MULTIPLE_FLOOR_ADV_GROUP), ar); > bc = description->GetParameterI(DescLevel(ID_MULTIPLE_FLOOR_ADV_GROUP), ar); > if (bc) > { > bc->SetBool(DESC_HIDE, FALSE); > } > } > //--- > flags |= DESCFLAGS_DESC_LOADED; > return ObjectData::GetDDescription(node, description, flags); > } as i can remember (i stopped developing 2003 and continue now) the dialog worked fine. now with 8.5 the dialog changes only, when i press a button or another item after i've choosen the type of elements i want to see from the dropdown.... i hope, this hels a little bit... ralph
On 10/01/2005 at 11:29, xxxxxxxx wrote:
seems all to be correct. Where do you get the stmode/mode etc. variables from? Are you getting those values within GetDDescription()?
On 10/01/2005 at 21:08, xxxxxxxx wrote:
these variables are global at the moment, but they get their value in GetVirtualObjects() via "data->GetLong(QS_STMODE)" edit: i now put the "data->Get..." functions into "Message()" is that the right way ? it seems to work...
On 11/01/2005 at 05:09, xxxxxxxx wrote:
global values are no good idea for this as they might be filled at a later point in the pipeline. And most probably GetDDescription is called before GetVirtualObjects (as you seem to have noticed already).
I would fill them directly in GetDDescription if not necessary otherwise (or make them a private member variable if not needed otherwise) but if it works in the message function... (depends on when you´d need it).
On 11/01/2005 at 05:20, xxxxxxxx wrote:
"global values are no good idea for this as they might be filled at a later point in the pipeline" i know, that this should not be, it is a "artefakt" from the beginning, they were defined only for testing. after that i forget to put them into my class. it is not necessary, thart they are global. i'll fix this.