Re: Tool tips & win32lib
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Mar 27, 2002
- 560 views
Jordah, Maybe this will help? Multiline ToolTips: "The ToolTip control will wrap the lines automatically, or you can use a carriage return/line feed combination, \r\n, to force line breaks at particular locations." Dan Moyer >From microsoft, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla tform/commctls/tooltip/usingtooltips.asp Multiline ToolTips Multiline ToolTips allow text to be displayed on more than one line. They are supported by version 4.70 and later of the common controls. Your application creates a multiline ToolTip by responding to a TTN_GETDISPINFO notification message. To force the ToolTip control to use multiple lines, send a TTM_SETMAXTIPWIDTH message, specifying the width of the display rectangle. Text that exceeds this width will wrap to the next line rather than widening the display region. The rectangle height will be increased as needed to accommodate the additional lines. The ToolTip control will wrap the lines automatically, or you can use a carriage return/line feed combination, \r\n, to force line breaks at particular locations. Note that the text buffer specified by the szText member of the NMTTDISPINFO structure can accommodate only 80 characters. If you need to use a longer string, point the lpszText member of NMTTDISPINFO to a buffer containing the desired text. ----- Original Message ----- From: "jordah ferguson" <jorfergie03 at yahoo.com> To: "EUforum" <EUforum at topica.com> Sent: Wednesday, March 27, 2002 8:26 AM Subject: RE: Tool tips & win32lib > > i tried the method, it strictly allows characters up to the specified > range for example if your word if euman at bellsouth.net > and your range is 100 > you get > ------- > |euman@| > |bellso| > |uth.ne| > |t | > -------- > > isn't there a way of doing, clever wrapping > > jordah ferguson > > Derek Parnell wrote: > > Thanks, I'll give it a try. > > ----- Original Message ----- > > From: "Tony Steward" <tony at locksdownunder.com> > > To: "EUforum" <EUforum at topica.com> > > Sent: Tuesday, March 26, 2002 10:00 PM > > Subject: RE: Tool tips & win32lib > > > > > > > Hi Jordan, > > > Heres an old post by euman which may help > > > > > > cut... > > > Someone wrote me and asked how do I set the multi-column on a tooltip > > > well, here it is.....(Derek you might want to add this) > > > > > > Find: > > > global procedure setHintEx(integer id,sequence text,atom exflags) > > > > > > near the end of the procedure you should see this > > > > > > VOID=sendMessage(tooltipControl,lTTmsg,0,ti) > > > > > > Put the next line above the one I just typed above "Like this" > > > > > > VOID=sendMessage(tooltipControl, TTM_SETMAXTIPWIDTH, 0, 100) > > > VOID=sendMessage(tooltipControl,lTTmsg,0,ti) > > > > > > I tried to set this up in lTTmsg but couldnt figure out how to connect > > > the > > > length on the string so that it would be automatic. > > > > > > Note: > > > You will need to set the with where I have 100 on the end of the > > > message to length you wish to wrap the line...' > > > > > > Alternatively you could do this: > > > > > > global procedure setHintEx(integer id,sequence text,atom exflags, > > > integer len) > > > > > > VOID=sendMessage(tooltipControl, TTM_SETMAXTIPWIDTH, 0, len) > > > > > > and in your program do this: > > > > > > >>>>> (Here's the Change) > > > setHintEx( id, "text", 0, 100 ) > > > > > > and this should work fine. > > > > > > > > > Euman > > > euman at bellsouth.net > > > end cut.... > > > jordah ferguson wrote: > > > > > > > > > > > > --To: any one concerned <euforum at topica.com> > > > > --Subject: Tool tips & win32lib > > > > --Date: Mon, 25 March, 2002. > > > > --From: Jordah Ferguson <jorfergie03 at yahoo.com> > > > > --Priority: 3 > > > > --Saved by: Jordah Ferguson (Acc. Name: jordah ferguson ) > > > > > > > > > > > > Hi all, > > > > > > > > I have a couple of questions i would like to ask about the tooltip > > > > control > > > > > > > > 1) Can toottips be multiline? Cause i have a long message i would like > > > > to present when a certain listview > > > > item is clicked. When i make the tooltip text long, it is like > > > > sending a long unwrapped text to the printer! > > > > 2)Can the background and foreground colour of a tooltip be changed? I > > > > kinda want to make a special good > > > > looking tooltip for the secial listview items that are being clicked. > > > > 3)Can tooltips be created with extra styles such as having a 3D border? > > > > 4)Can an Icon control or bitmap control be added to a tooltip? > > > > > > > > That wraps up the questions i had about win32lib tooltips.. > > > > > > > > Thanx in advance > > > > Jordah Ferguson > > > > jorfergie03 at yahoo.com > > > > > > > > --Processed and saved using: Cirrus Mail ver 0.2a