Jump to content

Programmatic update of control's description to Context Help window


Recommended Posts

Hey All,

Here's an odd one - I'm programmatically updating the description of a control. I'm using the description of another VI - simply copying the test out of the VIs description into the control's description. The text makes it in there okay, but the text in the description of the control isn't wrapped in the Context Help window like it is in the VI's description.

Hovering the mouse over the VI (the description source):

post-181-1145462440.jpg?width=400

Hovering the mouse over the control (the description sink):

post-181-1145462709.jpg?width=400

Is there any way to force the text to be wrapped in the Context Help window (I should mention that I'm using Windows user32.dll functions to lock the Context Help window to particular dimensions)? If I can't do that, then I'd be happy to manually insert CR+LF into my string (it's dirty, but it'll work) - does anyone know the tag to do that (it's not <p> - the Context Help window uses a very limited set of HTML tags)?

Download File:post-181-1145462352.vi

Download File:post-181-1145462360.vi

Link to comment

I believe if you put two '\r\n' characters before and after a given sentence/paragraph, that will cause the paragraph to word wrap. You can try it in your VI by going to Description and Tip and pressing Enter twice before your paragraph, and after your paragraph. I have attached a VI that contains your Numeric control with the context help wrapping appropriately after making this change. If you are changing the description programatically, just convert single \r\n characters into \r\n\r\n. I noticed in your control's context help you just have \n characters, so if you're updating the context help programmatically, you would probably want to write some code that searches for \n before and after text and replaces it with \r\n\r\n.

-D

Download File:post-4441-1145475838.vi

Link to comment

I can't beleive I overlooked it, but a smiple <enter> at the end of the line works :blink: That said, it'd still be much better if it wrapped properly...

I believe if you put two '\r\n' characters before and after a given sentence/paragraph, that will cause the paragraph to word wrap.

Ahhhhhhhhh - thanks Darren - that works perfectly!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.