BUTTON_SetTextOffset() is unable to set offset for the text in Button Widget.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • BUTTON_SetTextOffset() is unable to set offset for the text in Button Widget.

    Hi,
    BUTTON_SetTextOffset() is unable to set offset for the text in Button Widget.

    First, I set a bmp on button and then set a text on Button.
    When i tried to use BUTTON_SetTextOffset() after setting text it was not displaying on the button.


    REgards,
    Venkat
  • Hi,
    Sample code follows;
    static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {

    { BUTTON_CreateIndirect, 0, ID_BUTTON_0, 149, 5, 87, 53, 0, 0, 0 },

    }



    hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
    BUTTON_SetFont(hItem, GUI_FONT_16B_ASCII);
    BUTTON_SetBitmap(hItem, BUTTON_BI_UNPRESSED, &bmInactive_Tab_Inventory);
    BUTTON_SetBitmap(hItem, BUTTON_BI_PRESSED, &bmTab_Inventory);
    BUTTON_SetTextOffset(hItem,5 ,70);
    BUTTON_SetText(hItem,"Inventory");


    Regards,
    venkat
  • Hello Venkat,

    In order to make sure the text can be displayed, please start with an offset of 0. If the text is not displayed with this setting, please check if the used font contains the characters which should be displayed. Not existing characters are skipped automatically.

    Best regards,
    Adrian