Display font control in the user interface.

Hi All,

I'm developing a mdl programm in Microsation V8 XM edition, The concept is placing text in the desing file with selected font, So the user will choose a font from the dialog box after that he will press "OK" button then the entered text value will placed in desing file and it should have the font what he chosen.

So, I want create a font input box that should look like in Microstation "place text" tool box.

How to create it and how to store the chosen font value after press the "OK" button?

The font input box should look like the below screen shot:

Kinldy help me on this.

Advance Thanks & Regards,

Jeyan.

Parents
  • Borrowing MicroStation UI Widgets

    Jeyankondan said:
    I want to create a font input box that should look like in MicroStation "place text" tool box

    MicroStation's MDL dialog framework is fundamently well-designed and elegant. However, it lacks a slick design tool, which puts many people off the technology.

    MDL user interface (UI) widgets are placed declaratively in a resource file. Here's one of the delivered MDL examples' dialog definition …

    DialogBoxRsc DIALOGID_Basic =
    {
    DIALOGATTR_DEFAULT | DIALOGATTR_SINKABLE,
    25*XC, 7*YC,
    NOHELP, MHELP, HOOKDIALOGID_Basic, NOPARENTID,
    TXT_BasicDialogBox,
    {
    {{X1,GENY(1),XW,0}, Text, TEXTID_Basic, ON, 0, "", ""},
    {{X1,GENY(2),XW,0}, OptionButton, OPTIONBUTTONID_Basic, ON, 0, "", ""},
    {{X2,GENY(4),BTN_WIDTH,0}, PushButton, PUSHBUTTONID_OModal, ON, 0,"",""},
    }
    };

    The UI widgets are each part of that somewhat complex data definition. The MDL Programmer's Guide describes those widgets in detail. The following extract defines the placement of a text item …

    {{X1,GENY(1),XW,0}, Text,	      TEXTID_Basic, ON, 0, "", ""},

    Your resource file must contain a definition of TEXTID_Basic. See the Basic example for the detail.

    However, you can borrow resources from elsewhere. If a resource definition already exists in a binary resource, and the MDL resource librarian can find it, then you can incorporate it into your dialog. This unrivalled benefit of MDL dialogs means that you can re-use an existing MicroStation widget in your dialog. If you can find the resource ID of the MicroStation font ComboBox, then you can use it. Search the header files in the \mdl\include folder for likely candidates.

    I think that the delivered example MyApp uses a few MicroStation resources in its dialog.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Reply
  • Borrowing MicroStation UI Widgets

    Jeyankondan said:
    I want to create a font input box that should look like in MicroStation "place text" tool box

    MicroStation's MDL dialog framework is fundamently well-designed and elegant. However, it lacks a slick design tool, which puts many people off the technology.

    MDL user interface (UI) widgets are placed declaratively in a resource file. Here's one of the delivered MDL examples' dialog definition …

    DialogBoxRsc DIALOGID_Basic =
    {
    DIALOGATTR_DEFAULT | DIALOGATTR_SINKABLE,
    25*XC, 7*YC,
    NOHELP, MHELP, HOOKDIALOGID_Basic, NOPARENTID,
    TXT_BasicDialogBox,
    {
    {{X1,GENY(1),XW,0}, Text, TEXTID_Basic, ON, 0, "", ""},
    {{X1,GENY(2),XW,0}, OptionButton, OPTIONBUTTONID_Basic, ON, 0, "", ""},
    {{X2,GENY(4),BTN_WIDTH,0}, PushButton, PUSHBUTTONID_OModal, ON, 0,"",""},
    }
    };

    The UI widgets are each part of that somewhat complex data definition. The MDL Programmer's Guide describes those widgets in detail. The following extract defines the placement of a text item …

    {{X1,GENY(1),XW,0}, Text,	      TEXTID_Basic, ON, 0, "", ""},

    Your resource file must contain a definition of TEXTID_Basic. See the Basic example for the detail.

    However, you can borrow resources from elsewhere. If a resource definition already exists in a binary resource, and the MDL resource librarian can find it, then you can incorporate it into your dialog. This unrivalled benefit of MDL dialogs means that you can re-use an existing MicroStation widget in your dialog. If you can find the resource ID of the MicroStation font ComboBox, then you can use it. Search the header files in the \mdl\include folder for likely candidates.

    I think that the delivered example MyApp uses a few MicroStation resources in its dialog.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Children
No Data