How does GroupBeginInMenuLine() work?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2010 at 10:37, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11.530
Platform: Windows ;
Language(s) : C++ ;---------
Hi,can somebody tell me how to use "GroupBeginInMenuLine()" correctly? I try to recreate the default "Coordinate Manager" layout. This has three descriptive text elements in its menu line.
Here's the "Coordinate Manager" dialog:
And here's my dialog:
This is the code to generate the menu line entries:
GroupBeginInMenuLine(); GroupBegin(0,BFH_LEFT,3,0,"",0); AddStaticText(0, BFH_LEFT | BFH_SCALEFIT, 0, 0, "Position", 0); AddStaticText(0, BFH_LEFT | BFH_SCALEFIT, 0, 0, "Scale", 0); AddStaticText(0, BFH_LEFT | BFH_SCALEFIT, 0, 0, "Rotation", 0); GroupEnd(); GroupEnd();
How can I orient them left and spread them out to match the coloumns of the editfields?
Thanx alot in advane, best manuel
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/02/2010 at 00:31, xxxxxxxx wrote:
The menu of the coordinate manager is actually no menu but just a normal dialog group. What makes it appear as menu is the WINDOWPIN dialog element.
This is the resource code of this line:
GROUP { COLUMNS 1; SCALE_H; SPACE 4,0; GROUP { ROWS 1; SCALE_H; WINDOWPIN { ALIGN_LEFT; ALIGN_TOP; }; STATICTEXT IDC_HEADLINE1 { SIZE 100,0; SCALE_H; } STATICTEXT IDC_HEADLINE2 { SIZE 100,0; SCALE_H; } STATICTEXT IDC_HEADLINE3 { SIZE 100,0; SCALE_H; } } SEPARATOR { SCALE_H; } }
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/02/2010 at 03:24, xxxxxxxx wrote:
Thanx Matthias, I'll try this.
Is there a possibility to make this work if the dialog is hard coded as in my case or do I have to use descriptions? I know, using external resources is best practise, but for prototyping in house tools doing it by code is often faster.
Best Manuel
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/02/2010 at 05:58, xxxxxxxx wrote:
It is possible to hard code it. Have a look at the code below. Make sure to remove the menu bar in the dialog's constructor.
class ListViewDialog : public GeDialog { public: ListViewDialog(void); virtual Bool CreateLayout(void); }; ListViewDialog::ListViewDialog(void) { C4DOS.Cd->AddGadget(Get(),DIALOG_NOMENUBAR,0,NULL,0,0,0,0,NULL,NULL); //removes the menu bar } Bool ListViewDialog::CreateLayout(void) { // first call the parent instance Bool res = GeDialog::CreateLayout(); GroupBegin(0,BFH_SCALE|BFH_LEFT,0,1,String(),0); C4DOS.Cd->AddGadget(Get(),DIALOG_PIN,0,NULL,BFH_LEFT|BFV_TOP,0,0,0,NULL,NULL); //add the window pin AddStaticText(0,BFH_SCALE,100,0,String("Position"),0); AddStaticText(0,BFH_SCALE,100,0,String("Scale"),0); AddStaticText(0,BFH_SCALE,100,0,String("Rotation"),0); GroupEnd(); return res; }
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/02/2010 at 06:04, xxxxxxxx wrote:
That's very helpful. Thank you very much for your fast answer.
Best Manuel