Re: TabItem text

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message -----
From: <irvm at ellijay.com>
To: "EUforum" <EUforum at topica.com>
Subject: TabItem text

> Is it possible to programatically change the text shown on a tab item?
> The short program below "should" do that, but it won't for me.
>
<SNIP>


Hi Irv,
you're correct in that setText() does not support TabItems. I've fixed this
in the next version. Here is the code that I added to the setText() function
in win32lib.ew.

 ----------

    if window_type[id] = TabItem then
        -- get tab index
        lPart = find( id, window_tabitems[ window_owner[id] ] ) - 1

        -- Allocate a tab structure
        ptr = acquire_mem( 0, SIZEOF_TC_ITEM )

        -- set the items
        store( ptr, TC_ITEM_mask,       TCIF_TEXT )
        store( ptr, TC_ITEM_iImage,     -1 )
        store( ptr, TC_ITEM_pszText,    s )
        store( ptr, TC_ITEM_cchTextMax, length(s) )

        -- Change the tab text
        VOID = sendMessage( window_owner[id], TCM_SETITEM, lPart, ptr )

        -- Free the structure
        release_mem( ptr )

        return
    end if

 ----------------
Derek Parnell
Melbourne, Australia
"To finish a job quickly, go slower."

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu