1. Two questions about using Win32Lib
- Posted by Prasanta Chakraborty <prasanta at WRITEME.COM> Nov 09, 2000
- 378 views
- Last edited Nov 10, 2000
Hi, I have got two questions regarding using Win32Lib, can someone please help me. 1. I successfully created a ListView in report style, how can I trap doubleclick on any list item so that I can show detail of the selected item. I tried onEvent, onClick, but none of these events triggers when I double click the list. 2. How can I print formatted text in windows printer. I can print text using wPuts() but if I put TAB control character in my text, it is not recognised by my printer, it comes out as garbage character. I am using HP Laserjet. Regards, Prasanta.
2. Re: Two questions about using Win32Lib
- Posted by David Cuny <dcuny at LANSET.COM> Nov 09, 2000
- 375 views
Prasanta Chakraborty wrote: > 2. How can I print formatted text in windows > printer. I can print text using wPuts() but if > I put TAB control character in my text, it is not > recognised by my printer, it comes out as garbage > character. The print routines don't recognize tabs. If you are using fixed width characters to print, you can use this routine to convert tabs into spaces: -- size of the tab constant Tab = 8 function tab_to_space( sequence s ) sequence new integer at new = "" for i = 1 to length( s ) do if s[i] = '\t' then at = length( new ) new &= repeat( ' ', (Tab) - remainder( at, Tab ) ) else new &= s[i] end if end for return new end function -- David Cuny
3. Re: Two questions about using Win32Lib
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET> Nov 10, 2000
- 383 views
Prasanta, Use the "onMouse" event, and then trap for LeftDoubleClick, approx. like this: procedure List1_onMouse( int event, int x, int y, int shift ) integer index index = getIndex(List1) if event = LeftDoubleClick then -- do whatever, using "index" end if end procedure onMouse[List1] = routine_id("List1_onMouse") Dan Moyer ----- Original Message ----- From: "Prasanta Chakraborty" <prasanta at WRITEME.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Thursday, November 09, 2000 5:09 PM Subject: Two questions about using Win32Lib > Hi, > > I have got two questions regarding using Win32Lib, can someone please > help me. > > 1. I successfully created a ListView in report style, how can I trap > doubleclick on any list item so that I can show detail of the selected > item. I tried onEvent, onClick, but none of these events triggers when I > double click the list. > > 2. How can I print formatted text in windows printer. I can print text > using wPuts() but if I put TAB control character in my text, it is not > recognised by my printer, it comes out as garbage character. I am using HP > Laserjet. > > Regards, > Prasanta.