Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Showing tooltip throws an exception

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Harri



Joined: 21 Nov 2005
Posts: 13

PostPosted: Tue Mar 25, 2008 2:51 pm    Post subject: Showing tooltip throws an exception Reply with quote

Hi all,

In the GetCelldata, we specifiy a tooltip that contains a string. This string looks like “Init {0}, {1} – command”. It is just a string, the {0}, {1} do not specify any arguments, they are part of the string. However, when virtual tree wants to show this string in the tooltip, it tries to fill in the {0}, causing an exception (see below). How can this be solved?


Thanks in advance.
Harri

Exception - stacktrace:
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)

at System.String.Format(IFormatProvider provider, String format, Object[] args)

at System.String.Format(String format, Object arg0)

at Infralution.Controls.VirtualTree.CellData.GetToolTipText()

at Infralution.Controls.VirtualTree.CellWidget.GetToolTipText()

at Infralution.Controls.VirtualTree.CellWidget.OnMouseEnter(MouseEventArgs e)

at Infralution.Controls.WidgetControl.OnMouseMove(MouseEventArgs e)

at System.Windows.Forms.Control.WmMouseMove(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at Infralution.Controls.BorderedControl.WndProc(Message& m)

at Infralution.Controls.VirtualTree.VirtualTree.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

at System.Windows.Forms.Application.Run(Form mainForm)

at Nova.Program.Main(String[] args) in C:\Products\Nova\NovaCV\Nova\Program.cs:line 93

at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)

at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Mar 25, 2008 9:37 pm    Post subject: Reply with quote

The tooltip is formatted (using the String.Format method) to allow inclusion of the CellData.Value. If you want to display literal "{" and "}" values then you will need to escape them eg

"Init {{0}}, {{1}} - command"
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group