cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Populating a Dashboard's Standard Layout

mark_stallard
1-Newbie

Populating a Dashboard's Standard Layout

Hi Everyone -

I'm trying to add OK (checkmark) and Cancel (X) pushbuttons to
the standard layout of a dashboard, but I'm finding it difficult
for want of a good example. In the Wildfire 3 Pro/Toolkit docs,
there are apparently no dashboard programming examples at all.

Here's a summary of the process I'm using:

1. Use ProUIDashboardpageoptionsAlloc() and
ProUIDashboardshowoptionsAlloc() to set up the main
dashboard page.

2. Use ProUIDashboardshowoptionsNotificationSet() to set
a callback for the dashboard's events

3. Call ProUIDashboardShow(), which triggers the events
PRO_UI_DASHBOARD_CREATE and PRO_UI_DASHBOARD_SHOW.

4. Upon trapping PRO_UI_DASHBOARD_CREATE, use
ProUIDashboardStdlayoutGet() to get the dashboard's
standard layout name. The trapped name is typically
"dashInst0.stdbtn_lay".

5. Here's where I get stuck: Add the new buttons, which
are already defined a .res file containing with a
"Layout ( ... )" defintion, using ProUIDialogLayoutAdd()
or ProUILayoutLayoutAdd(). I usually get the return
value PRO_TK_GENERAL_ERROR.

I have tried all kinds of shenanigans with the dialog name and
layout name arguments for ProUIDialogLayoutAdd() and
ProUILayoutLayoutAdd():

A. Using "dashInst0.stdbtn_lay" as the dialog name.

B. Using the dashboard resource file name as the dialog
name and "dashInst0.stdbtn_lay" as the layout name.

C. Splitting the standard layout name on the "." to use
"dashInst0" as the dialog name and "stdbtn_lay" as
the layout name.

D. Using an empty string or NULL as the dialog name.
Using NULL causes ProUILayoutLayoutAdd() to return
PRO_TK_BAD_INPUTS.

None of this has worked so far. Has anyone had better luck
putting buttons in the standard layout of a dashboard?

I'm running Pro/Engineer Wildfire 3 Build M080 on Windows XP.
Thanks!

|+| M a r k |+|

- Mark Stallard
- Raytheon Company
- Sudbury, Massachusetts USA

This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1

I owe two "thank you's" to Scott Connover at PTC. Scott sent
me a reply to my earlier message, but I had already searched
the proecus archives and found some helpful advice that he
gave on this subject back in February.

While I still can't load a sublayout from a .res file into a
dashboard's standard layout area, I was able to add pushbuttons
using ProUILayoutPushbuttonAdd(). The important step I was
missing was to use the dashboard main page device name from
ProUIDashboardpageDevicenameGet() as the dialog name in
ProUILayoutPushbuttonAdd().

Thanks again, Scott!

|+| M a r k |+|





"Mark R Stallard" <->
07/25/2007 12:16 PM
Please respond to
"Mark R Stallard" <->


To
-
cc

Subject
[proecus] - Populating a Dashboard's Standard Layout






Hi Everyone -

I'm trying to add OK (checkmark) and Cancel (X) pushbuttons to
the standard layout of a dashboard, but I'm finding it difficult
for want of a good example. In the Wildfire 3 Pro/Toolkit docs,
there are apparently no dashboard programming examples at all.

Here's a summary of the process I'm using:

1. Use ProUIDashboardpageoptionsAlloc() and
ProUIDashboardshowoptionsAlloc() to set up the main
dashboard page.

2. Use ProUIDashboardshowoptionsNotificationSet() to set
a callback for the dashboard's events

3. Call ProUIDashboardShow(), which triggers the events
PRO_UI_DASHBOARD_CREATE and PRO_UI_DASHBOARD_SHOW.

4. Upon trapping PRO_UI_DASHBOARD_CREATE, use
ProUIDashboardStdlayoutGet() to get the dashboard's
standard layout name. The trapped name is typically
"dashInst0.stdbtn_lay".

5. Here's where I get stuck: Add the new buttons, which
are already defined a .res file containing with a
"Layout ( ... )" defintion, using ProUIDialogLayoutAdd()
or ProUILayoutLayoutAdd(). I usually get the return
value PRO_TK_GENERAL_ERROR.

I have tried all kinds of shenanigans with the dialog name and
layout name arguments for ProUIDialogLayoutAdd() and
ProUILayoutLayoutAdd():

A. Using "dashInst0.stdbtn_lay" as the dialog name.

B. Using the dashboard resource file name as the dialog
name and "dashInst0.stdbtn_lay" as the layout name.

C. Splitting the standard layout name on the "." to use
"dashInst0" as the dialog name and "stdbtn_lay" as
the layout name.

D. Using an empty string or NULL as the dialog name.
Using NULL causes ProUILayoutLayoutAdd() to return
PRO_TK_BAD_INPUTS.

None of this has worked so far. Has anyone had better luck
putting buttons in the standard layout of a dashboard?

I'm running Pro/Engineer Wildfire 3 Build M080 on Windows XP.
Thanks!

|+| M a r k |+|

- Mark Stallard
- Raytheon Company
- Sudbury, Massachusetts USA
Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics:
PTC Control Center
Creo+ Portal
Real-time Collaboration