Menu

#89 icon-position for -compound left option

open
None
5
2002-03-02
2001-11-21
Anonymous
No

When using the new implemented "-compound left" option
from the menu-command, this icon is position to the
left of the "text-column".
I suppose the icon should be put in the column where
the "selectimages" (refered to as "indicatorSpace")
are placed.

This is in tkWinMenu.c (for Tk 8.4a4):

To position the icon in the "indicator"-column (which
looks more windows-like :-)), simply
function "DrawMenuEntryLabel" has to be modified
from

--------------------------------------------------
switch ((enum compound) mePtr->compound) {
...
case COMPOUND_LEFT: {
textXOffset = imageWidth + 2;
textYOffset = 0;
imageXOffset = 0;
imageYOffset = 0;
break;
}
--------------------------------------------------

to
--------------------------------------------------
case COMPOUND_LEFT: {
textXOffset = 0;
textYOffset = 0;
imageXOffset = x+activeBorderWidth-leftEdge;
imageYOffset = 0;
´ break;
}
--------------------------------------------------

Thanks in advance
Stefan

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Just wish to point out that if the image is moved to the
    left in this case, and the menu entry can have a 'tick' put
    to the left (e.g. its a radiobutton or checkbutton item),
    then that tick would overlap the image.

     
  • Stefan Vogel

    Stefan Vogel - 2001-11-21

    Logged In: YES
    user_id=250752

    Yes, that's right.
    Perhaps it's better to add another option to
    -compound
    Something like
    -compound left_indicator or
    -compount indicator
    or similar, so that you can use the -compound left
    option for checkbuttons/radioboxes.
    Should the tick not be configurable, too?

     
  • Todd Helfter

    Todd Helfter - 2002-01-29
    • labels: 318721 -->
    • milestone: 141517 -->
    • assigned_to: tmh --> nobody
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2002-03-02
    • assigned_to: nobody --> tmh
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.