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 » Refresh Layout
Refresh Layout [message #19112] Wed, 12 November 2008 23:05 Go to next message
sapiency is currently offline  sapiency
Messages: 56
Registered: September 2008
Member
Hi,

I start searching for devices from a menuitem. All founded devices are insert in a devicetree.

Actually the tree refresh when I move the mouse over the tree, but it would be nice to see all the devices which where found without user action.

I tried Refresh[...]() in the method where the elements are insert into the tree but it does not work as I expect ...

Any idea for a solution?

regards

reinhard

[Updated on: Wed, 12 November 2008 23:06]

Report message to a moderator

Re: Refresh Layout [message #19126 is a reply to message #19112] Thu, 13 November 2008 20:29 Go to previous messageGo to next message
sapiency is currently offline  sapiency
Messages: 56
Registered: September 2008
Member
mmmh, maybe too less information ...

- gui with PostCallback - Method catch messages from a thread
and insert data in a datastructure. one datastructure for each connected device.

- searching for devices is started from the menu and done by the thread in the background

- new devices are simple messages with special headers and go the same way as all other messages too. thread put them in a queue, postcallback catch dem ....

- all devices are shown in a devicetree (works), but updating the layout of the tree, with showing all subelements is only done when the user work - move the mouse over the gui.

because of further activities/ features I want that the screen is updated whenever a message arrives which bear on data shown on the gui, but not when messages arrive which are for devices in the background.

Is it possible to do this with upp? Current it is not done ore the delay is so huge that I don't realized it.

regards

reinhard
Re: Refresh Layout [message #19136 is a reply to message #19126] Fri, 14 November 2008 17:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Are we speaking about TreeCtrl?
Re: Refresh Layout [message #19138 is a reply to message #19136] Fri, 14 November 2008 19:22 Go to previous messageGo to next message
sapiency is currently offline  sapiency
Messages: 56
Registered: September 2008
Member
luzr wrote on Fri, 14 November 2008 17:45

Are we speaking about TreeCtrl?

ups .. Embarassed yes ....

I realized that Refresh itselfs works. I tried it with a timer as shown in the example clock.

because it don't show what I expected in TreeCtrl I thought I use it in the wrong way generally.

When I Add a new treeelement I want to see it automatically in the opened tree. I also called the method opendeep(n), but even directly after I add the new element, nothing happened.

If it is not clear enough, I try to put everything in a small example.

Maybe it's only a problem of missing experience with programming or only the missing overview on upp features.

because of the current structure of holding data in the background I need a signal or anything else which I can use to start my code to get the new data out of the datastructure. I tried this with refresh and then overload Paint and put there the code I want to execute. But that is not a really good solution ... because there are elements I want to be editable. Maybe you understand what I want to do with this few information.

regards

reinhard
Re: Refresh Layout [message #19139 is a reply to message #19138] Fri, 14 November 2008 19:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
sapiency wrote on Fri, 14 November 2008 13:22


If it is not clear enough, I try to put everything in a small example.



Please do. ALWAYS add a testcase, if possible, please. Saves a ton of misunderstandings. And when it is U++ bug, provides a good testcase to fix it.

Mirek
Re: Refresh Layout [message #19143 is a reply to message #19139] Sat, 15 November 2008 00:36 Go to previous messageGo to next message
sapiency is currently offline  sapiency
Messages: 56
Registered: September 2008
Member
hi,

I think I found the problem ...

the application is almost simular to the example.

when I put Refresh() at the end of the postcallback, I get what I want, but not when I call it from the look in the callback. But when a lot of messages come in, I don't know how log it takes to process them.

mmm maybe I have to break the background process so the gui can refresh ..

regards

reinhard

ps: at first I tested it with the timer, it works perfect. by the way, how can I stop the timer?
  • Attachment: refresh.zip
    (Size: 1.12KB, Downloaded 224 times)
Re: Refresh Layout [message #19144 is a reply to message #19143] Sat, 15 November 2008 09:57 Go to previous messageGo to next message
sapiency is currently offline  sapiency
Messages: 56
Registered: September 2008
Member
On action in the TreeCtrl I need to refresh some other parts of the gui. But they are childs of the main window and Refresh..() has no effect on that parts. *parent is private so I cannot call a function from the parent window. Any tip to solve this? Or does I have to give the child a reference to the parent manually ..

regards reinhard
Re: Refresh Layout [message #19149 is a reply to message #19144] Sat, 15 November 2008 14:43 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OnChange does not end for very long time -> there is no chance of updating the GUI (we are running just single main thread; usually GUI gets updated when the event queue is empty).
Previous Topic: DropList not working
Next Topic: Propose a slight change to DropCoice/WithDropChoice
Goto Forum:
  


Current Time: Fri Apr 19 10:14:19 CEST 2024

Total time taken to generate the page: 0.01545 seconds