Difference between revisions of "Miscellaneous GUI objects"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
(New page: This page covers miscellaneous tips & tricks for GUI objects. __TOC__ <br> <h2 style="margin:0;background-color:#ddcef2;font-size:120%;font-weight:bold;border:1px solid #afa3bf;text-alig...)
 
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
This page covers miscellaneous tips & tricks for GUI objects.
+
{{PageHeader|Miscellaneous Child Objects}}
 +
 
  
 
__TOC__
 
__TOC__
<br>
 
  
<h2 style="margin:0;background-color:#ddcef2;font-size:120%;font-weight:bold;border:1px solid #afa3bf;text-align:left;color:#000;padding:0.2em 0.4em;">[[Image:Pointer.png]]How to get the handle of the next child object on a top level window</h2>
+
 
 +
<!------------------------------------------------------------------------------------------------------------------------------>
 +
{{TipHeader|How to get the handle of the next child object on a top level window}}
 
From a specific child object you can determine the next by using
 
From a specific child object you can determine the next by using
  
Line 12: Line 14:
 
<br>
 
<br>
  
<h2 style="margin:0;background-color:#ddcef2;font-size:120%;font-weight:bold;border:1px solid #afa3bf;text-align:left;color:#000;padding:0.2em 0.4em;">[[Image:Pointer.png]]How to get the handles of static child objects like label text or group boxes</h2>
+
<!------------------------------------------------------------------------------------------------------------------------------>
 +
{{TipHeader|How to get the handles of static child objects like label text or group boxes}}
 
To be able to get window handles for such objects, use the next assignment
 
To be able to get window handles for such objects, use the next assignment
  
Line 29: Line 32:
 
   Set hWndLabel = SalGetNextChild( hWndLabel, TYPE_BkgdText  )
 
   Set hWndLabel = SalGetNextChild( hWndLabel, TYPE_BkgdText  )
 
</pre>
 
</pre>
 +
 +
 +
 +
[[Category:Child Objects]]

Latest revision as of 10:17, 29 October 2013

Miscellaneous Child Objects


Contents


Pointer2.png How to get the handle of the next child object on a top level window Pointer.png

From a specific child object you can determine the next by using

hWndNextChild = SalGetNextChild ( hWndItem, TYPE_Any )


Pointer2.png How to get the handles of static child objects like label text or group boxes Pointer.png

To be able to get window handles for such objects, use the next assignment

Set bStaticsAsWindows = TRUE

After this, you can fetch the window handles by looping through all child objects in a top level window. Next sample shows how to loop all label objects, find specific ones and change them to another text.

Set hWndLabel = SalGetFirstChild( hWndForm, TYPE_BkgdText  )
While hWndLabel
  Call SalGetWindowText( hWndLabel , sLabel, 100 )
  If sLabel = 'ReplaceText'
    SalSetWindowText( hWndLabel, 'NewText' )
  Set hWndLabel = SalGetNextChild( hWndLabel, TYPE_BkgdText  )