Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » dynamic scatterDraw in a GUI (scatterDraw)
dynamic scatterDraw in a GUI [message #45573] Mon, 07 December 2015 10:06 Go to next message
danMalta is currently offline  danMalta
Messages: 2
Registered: December 2015
Junior Member
Hello!

I have a question - is there a way to dynamically attach and remove scatter widgets from a given window or layout?
I mean, I have a layout with an empty space in it, and at some point I would like to add 2 scatter's (scatterDraw/scatterCtrl)
to it, and maybe some other times I would like to add 6 scatter's to it, and remove their predecessor's.
Is it possible?

Thank's,
Dan.
Re: dynamic scatterDraw in a GUI [message #45575 is a reply to message #45573] Mon, 07 December 2015 10:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I have moved topic as the very same rules apply to any widget that you want to create dynamically.

Sure, why not.

There are several strategies how to do that.

I guess the most straightforward way is to

- mark the are of Layout that you want to fill with widgets with ParentCtrl

- have "Array<ScatterCtrl> list", or perhaps just "Array<Ctrl> list" to store the current list of widgets you want to add to dialog

- then just to reconfigure, list.Clear and list.Add or list.Create widgets, add them as children of that ParentCtrl with proper coordinates

Look here for inspiration:

http://www.ultimatepp.org/reference$DynamicDlg$en-us.html
Re: dynamic scatterDraw in a GUI [message #45577 is a reply to message #45573] Mon, 07 December 2015 10:44 Go to previous message
danMalta is currently offline  danMalta
Messages: 2
Registered: December 2015
Junior Member
Thank you for the quick answer and example link!
Previous Topic: Parent continues before child is painted
Next Topic: How to set a child as top most Ctrl
Goto Forum:
  


Current Time: Fri Mar 29 02:56:40 CET 2024

Total time taken to generate the page: 0.01203 seconds