How get dialog elements?

Alextrs

New Member
Hello, could you help me please? How can I get all the elements of a window (frames and their contents), and how then I can get access to them, if I want, for example, to get/set size and position?
 
You have to start at the window's handle and walk the widget tree. That way you can get a handle to all the elements in the screen and the handle has access to properties such a X and Y.
 
You have to start at the window's handle and walk the widget tree. That way you can get a handle to all the elements in the screen and the handle has access to properties such a X and Y.
Could you write an example, please? :blush1:
 
Thank you Cringer! I have sorted it out myself, that's what I have got:

Code:
wrk = CURENT-WINDOW:HANDLE.
wrk = wrk:FIRST-CHILD.
DO WHILE VALID-HANDLE(wrk):
    dc = wrk:CURRENT-ITERATION.
    dc = dc:FIRST-CHILD.
    DO WHILE VALID-HANDLE(dc):
        DISP wrk:NAME dc:NAME. /*EXAMPLE*/
        dc = dc:NEXT-SIBLING.
    END. 
    wrk = wrk:NEXT-SIBLING.
END.
 
Back
Top