Dear pb down, I have an urgent question: pb static text box how to dynamically create real-time display behind?
I am using pb to do a tree structure, click on different nodes of a tree structure, and to create dynamically show and hide the static text box, how to realize the real-time display and hide, please? Nasty., thank you!
CodePudding user response:
The
refer to the original poster wycfjycw response: pb down, I have an urgent question: pb static text box how to dynamically create real-time display behind? I am using pb to do a tree structure, click on different nodes of a tree structure, and to create dynamically show and hide the static text box, how to realize the real-time display and hide, please? Nasty., thank you! The effect is very poor, it is recommended that you use a datawindow to implement a tree structure (pb10.5 support all versions of the above tree type data window, if it is pb10 and the following version, can simulate a tee with lines type of data window), in this way, can also support editing If a tree controls, created dynamically display text box, you need to build a userobject (inherited from the static text boxes), named uo_statictext, then dynamically create the uo_statictext, you can write code, in the event in the userobject lostfocus events, are hidden CodePudding user response:
If a tree controls, created dynamically display text box, you need to build a userobject (inherited from the static text boxes), named uo_statictext, then dynamically create the uo_statictext, you can write code, in the event in the userobject lostfocus events, to hide the Do more troublesome, the effect is not very good, don't know what you to demand in order to achieve this function, write demand, maybe there are other ways CodePudding user response:
First of all, thank you for your reply! I want to click on the tree structure of different nodes, statistics show that different information, each click different nodes, the statistical information is different, so the demand dynamically create static text box displays the contents of the is different, but each time only in open tree structure in the window, click on the node for the first time is to display the information of the current node, then click the other nodes, and dynamically create static text box is not updated, also shows the just click on the information of the holiday, I do not know how to solve, the building Lord, please give guidance! thank you CodePudding user response:
With the several schemes for your reference 1. The figure below the statistical information is displayed in the tree, and add a static text to display, more convenient 2. A tree type data window, and more convenient to do Every time only in the open window tree structure is the first click on the node is only display the information of the current node, then click the other nodes, and dynamically create static text box is not updated, just click on the information of the festival also shows the A: events to write the wrong position, don't write in ItemPopulate dynamically created code, written in the SelectionChanged CodePudding user response:
The building Lord said method I tried, I can't! I do of tree structure is not fixed, but can add nodes and leaves, so every time click on the node to display dynamic retrieval of information from the database, retrieve the information stored in arrays, with static text can only display information, For example: the tree node is divided into 01 and 02 group, etc. (you can add and delete), among them, 01 and 02 group of nodes have more child nodes, such as the child nodes can also add and delete, so in each node and its children can add, delete, under the condition of the child nodes of the node need statistics below per click is variable, with static text can only meet the requirements of the same node, change the node cannot satisfy, If there is n node 01 to retrieve records, Int I Int i_num//i_num is in front of the datastore to retrieve the 01 and 02 group such as the number of node following String [] s For I=1 to i_num S [I]=dw_1. Object. PFC [i_num] Next Behind by dynamic openuserobject function creates a static text box, I used to display 01 and 02 batch under each node such as the number of its nodes, when click the other nodes dynamically created a static text box cannot be updated in real time, display or click on the node for the first time to create information, Please help, thank you!