Re: Tab Size setting in Edit fields (win32Lib)

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

Dave Probert wrote:
> 
> Hi Derek,
> 
> That's one of the things I tried, but every time I use a wParam of 1 then I
> get a machine
> exception (in w32Func) when starting my program.
> 
> txtSpecificContent is an MleText object.
> 
> VOID = sendMessage(txtSpecificContent,EM_SETTABSTOPS,1,3)
> (I've used other values instead of 3 as well)

Try this instead...

  VOID = sendMessage(txtSpecificContent,EM_SETTABSTOPS,1,{3} * 4})

The 4th parameter of EM_SETTABSTOPS must be a pointer to an array of integers.
If the 3rd parameter is '1', then only one integer needs to be stored and it
represents the number of 'dialog-units' for each tabstop. A 'dialog-unit' is one
quarter of the font's width.

If you use a count of more than 1, then the array represents the absolute
position of each tabstop. So you could use this ...

  VOID = sendMessage(txtSpecificContent,EM_SETTABSTOPS,4,{3,6,9,12} * 4)

to set four tabstops at *character* positions : 3, 6, 9, and 12.

-- 
Derek Parnell
Melbourne, Australia
irc://irc.sorcery.net:9000/euphoria

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

Search



Quick Links

User menu

Not signed in.

Misc Menu