hmm, interesting.
and presumably the same method will let you capture events occurring over the
item, by putting a control in there? i really want to be able to have xemacs
menus have "help text" that appears in the status bar, and handle
right-clicking
on a menu to bring up a context menu, so that users can more easily personalize
the menu, which is abysmally difficult now.
if i do such a thing, how do i pass all the other events to the menu handler?
or perhaps it snarfs them before even dispatching them to the control?
i'm sure this stuff can be done because i've seen other apps do them, but i just
don't quite know how.
"James N. Potts" wrote:
Under windows, it's more complicated than changing a resource, but it's
really not very difficult. Especially if all menu items are drawn with
the same face. You just set MF_OWNERDRAW when creating the menu items,
and then handle the WM_MEASUREITEM and WM_DRAWITEM messages. (Much like
any other "owner draw" item under windows. In fact, most of the code can
be salvaged from elsewhere.)
Only took about 5 minutes to hack a menu in one of my programs to draw in
different faces (a different face for each line).
-Jim Potts
Ben Wing <ben(a)666.com> wrote:
>in fact this is NOT hard or impossible under x, but is under windows.
changing
>x resources is easy from within the xemacs c code.
>
>
>
>"William M. Perry" wrote:
>>
>> Aaron Lehmann <aaronl(a)vitelus.com> writes:
>>
>> > > I know this would be hard or impossible under X, but what about
windows?
>> >
>> > Why would it be impossible under X?
>>
>> Because all that stuff lives beyond the control of XEmacs (at least it
used
>> to, I don't know about all the changes to lwlib that andy has done
>> lately). Right now you can only specify it via X resources, not from
>> lisp.
>>
>> -Bill P.
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/