05-18-2013 04:21 AM
In my panel, there are some tables using Zplane to arrange, there is another control, a ring control in the panel, when loading and display panel, sometimes the ring control can be displayed, sometimes it can not be displayed, but I can see an imprint of the ring. In this case, is there a way to redraw the panel or the control?
David
05-18-2013 08:28 AM
Hi David,
what do you mean by 'it can not be displayed'? You have a panel built in the UI editor which is then loaded with LoadPanel, right? Do you check for or receive any error with LoadPanel? Did you change z-plane position after loading or only in the UI editor? What happens if you try changing the z-plane position programmatically (ATTR_ZPLANE_POSITION) to move the ring to the front?
05-19-2013 03:24 AM
Hi Wolfgang,
I can describe the basic frame of my application as follows:
In the main function, I make a UIR as the parent panel, in the parent panel, it will load some child panel to perform the specifying function. For example, if it is need to show some data in a table, the application will use LoadPanel(parent, ...) to load the child panel and display it. The child panel include the ring control, the raised frame decoration and a table. Only using one RunInterface() in the main function to maintain events. But I found when displaying the child panel, sometimes the decration, the ring control can be seen, sometimes they can not be shown fully. I'd like to know is there anyway to redraw the panel?
David
05-19-2013 03:54 AM
DisplayPanel: Calling DisplayPanel when a panel is already displayed causes the panel to be completely redrawn.
05-25-2013 04:50 AM
Hi Wolfgang,
I have tried the DisplayPanel(), it does not have any effect. I have to make a right click event and using set visiable attribute to reload the control.
David
05-25-2013 07:50 AM
David,
can you post a small example project that shows this behavior?
05-25-2013 09:53 PM
This is a big project, it is difficult to get the all code phase. Just simplly describe the architecture of the app. as follows:
Arragged some picture button in the main panel, using RunUserInterface () to maintain the running and events. all of the panel color are (R:49, G:55, B:38). Of course, in the main function initializing stage, it will also do some works such as spawn threads, install control callback etc. Then the app run a monitor process in a child panel and wait user interact. PS---All the child panels' style is the classic, hidden mode. Once user pressed a button (picture button) in the main frame panel, it will load the relative child panel. In the child panel, it is placed a table, a ring and a tree control using UIR editor. The child panel will be manipulated by the main function, so it just returns its panel handle to the main panel, but not using RunUserInterface() individually. The Pseudo-code can be this:
//main frame:
int main()
{
mainpanel = loadpanel();
//initialize something
...
//wat user press button
RunUserinterface();
}
ButtonPressCallback()
{
if (pressed)
{
childPanel = loadChild();
insertTableitem;
insertTreeitems;
DisplayChild(childPanel);
}
if (hideFlag)
{
HidePanel(childPanel);
}
}
...
So, sometimes the child panel can not show controls fully, but in most cases it can show controls fully. I don't know why it will appear such a problem.
David
05-25-2013 10:18 PM
PS---The behaviour is: sometimes the control label cannot show, sometimes the tree items cannot show (using mouse to click can active its shows) fully...
05-26-2013 12:32 AM
The problem appears again, I post a screenshot as follows:
05-26-2013 05:58 AM
I just don't understand how many chid panels are nested in your application! In the screenshot you showed us there is no evidence on the main panel: does this means that you have:
a main panel,
a child panel inside the main panel with some picture buttons
the picture button loads a child panel of that child panel.
Right?
Apart from this, I do not understand how you detect user actions in the main () before RunUserInterface ()?
int main() { mainpanel = loadpanel(); //initialize something ... //wait user press button <<==== HOW ?? ? ? RunUserinterface(); }