Thanks, I agree it is better this way (provided the tabs do not get disturbed when people use different system font sizes!), but I would prefer to put the ":" just after the captions, not tabbed with the values as well, do you agree?
What everybody else thinks? Those are the 3 options, first one is the current one:
attached are two images. The first one shows how the error text is currently shown in a window with single tab stops only. The second one shows the console and window output with two tab stops where it´s neccessary.
This depends on what you choose to display the error.
If you use the built in ErrorDialog() function then the message with 2 tabs look ugly.
There is no way we can format this so that it looks Ok in all circumstances...
I personally think that the MessageBox that you are using is not the best way to display the error...
Maybe we should add a method / function that returns a 2 dimensional array with descriptions and values, so you can format it yourself.
yes, it´s currently only a MsgBox. But i see the tab problems when i use a painted window and write the e:ToString() content to a mle- or txtControl instead. The idea to retrieve a 2 dim array instead sounds interesting. Then it would be e.g. possible to avoid tabs and simply add two txt controls to a form. The error descriptions go to the left and the error values to the right control.
But first of all, I´ll take a look at the possibility to split the current e:ToString() content.
i´ve looked at the ErrorDialog sources and added the possibility to position a tab. Because it doesn´t make much sence to pass an array of INTs i´m using a single INT only. i think the marshalling is ok.
PUBLIC METHOD SetTabStop ( i AS INT ) AS LOGIC
LOCAL tabPosPointer AS IntPtr
LOCAL lOk AS LOGIC
tabPosPointer := Marshal.AllocHGlobal( 1 * Marshal.SizeOf(typeof(INT)))
// NOTE: zero based !
Marshal.WriteInt32( tabPosPointer, 0 * Marshal.SizeOf(typeof(INT)), i )
lOk := ( Sendmessage ( SELF:ErrorText:Handle , EM_SETTABSTOPS , 1 , tabPosPointer ) == 1 )
Now the TextBox content might even look like in the attachment