🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2763

TPW, ModifyMenu with '\t', changing static text

#2763
From: Teemu J. M|tt|nen
Date: Mon, 20 May 1991 23:10
32 lines
1678 bytes
    A TPW beginners question:

    I'm trying to modify an Edit|Delete menu item in my program so that
    when user selects Options|Confirm Changes, the Edit|Delete menu
    string is 'Delete...\tDel' (\t => 'Del' right-aligned). The problem
    is that I can't get the \t to work with ModifyMenu. It works ok in
    the Menu Editor.

    This is what fails:

    ModifyMenu(Attr.Menu, cm_DeleteConn, mf_Enabled or mf_ByCommand,
               cm_DeleteConn, 'Delete...\tDel');

    After that the menu item is 'Delete...\tDel', which is not
    what I want. Any solutions/hints ?


    My second question is: how do I change the text of a static control ?
    I create it like this:

    ModeStat := New(PStatic, Init(@Self, id_ModeStat, 'XXXXX Mode',
                                         20, 10, 150, 20, 0));
    ModeStat^.Attr.Style := ModeStat^.Attr.Style and not ss_Right;

    I've RTFM, but no help.

    Teemu.
-- 
    Teemu Mottonen / Department of Computer Science / University of Helsinki
    tmottonen@cc.helsinki.fi | TMOTTONEN@FINUH | tmottone@kruuna.helsinki.fi
    address: Vapaalantie 26B, SF-01650 Vantaa, Finland / tel: + 358 0 844938
Technical Details
Message-ID: <1991May21.011024.1@cc.helsinki.fi>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!fuug!news.funet.fi!hydra!klaava!cc.helsinki.fi!tmottonen

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!fuug!news.funet.fi!hydra!klaava!cc.helsinki.fi!tmottonen
From: tmottonen@cc.helsinki.fi (Teemu J. M|tt|nen)
Newsgroups: comp.windows.ms.programmer
Subject: TPW, ModifyMenu with '\t', changing static text
Message-ID: <1991May21.011024.1@cc.helsinki.fi>
Date: 20 May 91 23:10:24 GMT
Sender: news@klaava.Helsinki.FI (Uutis Ankka)
Organization: University of Helsinki
Lines: 32