Is it possible to add an info box to items in PrimalForms

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
This topic is 9 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
daviesg6
Posts: 49
Last visit: Tue Nov 25, 2014 1:23 pm

Is it possible to add an info box to items in PrimalForms

Post by daviesg6 »

I would like to add an info box, the kind of thing you see on a web page when you hover over a link or an image, to buttons and/or text boxes in a primalforms form. Is it possible to do so and if so where do I go to add it :?: I have looked and can see a possible option but I'm not sure :?

Thanks
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Is it possible to add an info box to items in PrimalForm

Post by davidc »

Looks like you want to use a ToolTip control:

http://www.sapien.com/blog/2014/01/30/s ... p-control/

David
David
SAPIEN Technologies, Inc.
User avatar
daviesg6
Posts: 49
Last visit: Tue Nov 25, 2014 1:23 pm

Re: Is it possible to add an info box to items in PrimalForm

Post by daviesg6 »

thanks, that looks like what I need.
However, I used this as per the instructions and, though it works, I get errors.
I tested with just 1 tooltip, the error I get is
PowerShell Code
Double-click the code block to select all.
The property 'ToolTip' cannot be found on this object. Verify that the property exists and can be set.
At line:386 char:1
+ $SearchRightsButton.ToolTip = "List Permissions set on OU on screen"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyAssignmentException
The tooltip is called tooltip1, and it does actually display but obviously getting errors in the powershell window is not a good result.
Any idea what I've done wrong? As I say, I followed the instructions on the page you provided the link to
User avatar
daviesg6
Posts: 49
Last visit: Tue Nov 25, 2014 1:23 pm

Re: Is it possible to add an info box to items in PrimalForm

Post by daviesg6 »

I solved it.

Adding the ToolTip creates a line of code in the middle of the block that defines the button, see below second line below
PowerShell Code
Double-click the code block to select all.
$SearchRightsButton.TabIndex = 16
$SearchRightsButton.ToolTip = "Test message"
$SearchRightsButton.UseVisualStyleBackColor = $False
If this is left there it generates the error I posted earlier. Comment this out or delete it and the error goes away, but as long as the additional line at the bottom of the page you sent the link to and you get a tooltip that appears with no errors.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Is it possible to add an info box to items in PrimalForm

Post by davidc »

Thank you for reporting the bug. This only affects PrimalForm CE.

Workaround:

Use the toolTip's SetToolTip function in your script instead of using the designer to set this value.
PowerShell Code
Double-click the code block to select all.
$toolTip1.SetToolTip($button1, "This is a button")
David
David
SAPIEN Technologies, Inc.
User avatar
daviesg6
Posts: 49
Last visit: Tue Nov 25, 2014 1:23 pm

Re: Is it possible to add an info box to items in PrimalForm

Post by daviesg6 »

thanks David. I am using the CE version and using the function does get around this bug as you advise.
This topic is 9 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.