Jump to content

Adding a box on the run


Behr

Recommended Posts

Good Evening/Day

Was searching through the net and couldn't find an answer anywhere. I have dragable controls, and I would like if the user could draw a box on the front panel, while its running. Its just a visual thing. Let me explain better. There is 60 buttons, which can be dragged around. I would like that the user could drag 5 of them and put a box around them with a label and nothing more. The buttons dont have to be ounded to the box, the box is simply a visual thing, so the users can have an eye appealing thingy. I hope this makes scene and I hope this is doable and you could help me.

Thank you in advance.

Link to comment

Did not really understand your answer (not a pro here so my bad, still learning). Do you mean that the user will write how much and so on in advance? if so, then yeah, that should not be a problem.As long as I can create a box on the go it good. :)

Link to comment

On the controls palette under modern or class there is a sub palette called containers. In this palette are a number of different items in particular the tab control I was talking about. A tab control can hold other controls or indicators and can have multiple pages. Its a real good way to group controls in meaningful ways. If you bring up example finder (Help >> Find Examples...) and look in the Controlling Front Panel Objects Programmatically under the Building User Interfaces folder you will find the tab control properties example. This will give you an idea of what can be done with a tab.

I suppose another way to approach your problem is to simple place a picture control behind all the controls and draw the boxes in that though you could see a performance hit doing that since it can cause a significant number of updates to the front panel redrawing everything whenever only one thing changes.

Jason

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.