The following lets you pop-up your own dialog box to edit the documentation.
It would be very similar to edit a property. (You'd have to get the property
value and then set it rather than setting the Documentation). This is a
little more involved then just adding a property to a .pty file, but it is
still pretty straight-forward.

To get and set property values, if you were using an operation, you'd use
something like:

        value = operation.GetPropertyValue("toolName", "propertyName")
        result = operation.OverrideProperty("toolName", "propertyName", "value")

        Hope this helps,

                James.

' A simple dialog box with a text box and
' an OK and Cancel button
Begin Dialog UserDialog ,,324,232,"Untitled"
        OKButton 104,212,40,14
        CancelButton 164,212,40,14
        TextBox 8,4,300,200,.TextBox,1,"Courier New",10
End Dialog


Sub Main
        ' get the selected item... assuming only one
        Dim ritem As RoseItem
        Set ritem = RoseApp.CurrentModel.GetSelectedItems().GetAt(1)

        ' if there wasn't a selected item, then give a warning
        ' and exit
        If ritem Is Nothing Then
                MsgBox "No item selected"
                Exit Sub
        End If

        ' declare the dialog and set the contents of the
        ' text box to the documentation
        Dim dlog As UserDialog
        dlog.TextBox = ritem.Documentation

        ' now display it
        Dim result As Integer
        result = Dialog(dlog)

        ' if the user pushed OK, then reset the Documentation to
        ' the contents of the dialog box
        If result = -1 Then
                ritem.Documentation = dlog.TextBox
        End If
End Sub




> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Esperanza de Leon
> Sent: Wednesday, December 13, 2000 4:05 AM
> To: '[EMAIL PROTECTED]'
> Subject: (ROSE) Customizing Model Properties
>
>
>
> hi!
>
> i want to customize my model properties. i tried creating my
> property file
> (pty file) and successfully created a new tab containing the toolname,
> property name and the default value. but here's my problem, i
> wanted to
> customize it in such a way that it would contain an editable
> textbox, like
> the one that appears under documentation of the general tab.
> is it feasible?
> does anybody know how to do it?
>
> thanks in advance.
>
> =)
>
>
> **************************************************************
> **********
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
> http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> **************************************************************
> ***********
>

************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to