Difference between revisions of "Checkboxes"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
(New page: This page covers checkbox tips & tricks. __TOC__ <br> <h2 style="margin:0;background-color:#ddcef2;font-size:120%;font-weight:bold;border:1px solid #afa3bf;text-align:left;color:#000;pad...)
 
 
(6 intermediate revisions by one user not shown)
Line 1: Line 1:
This page covers checkbox tips & tricks.
+
{{PageHeader|CheckBox}}
 +
 
  
 
__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 set value using only the window handle of a checkbox</h2>
+
 
 +
<!------------------------------------------------------------------------------------------------------------------------------>
 +
{{TipHeader|How to set value using only the window handle of a checkbox}}
 
First you have to declare this constant<br>
 
First you have to declare this constant<br>
 
<pre>
 
<pre>
Line 21: Line 23:
 
<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 set the checkbox text at the left</h2>
+
<!------------------------------------------------------------------------------------------------------------------------------>
 +
{{TipHeader|How to set the checkbox text at the left}}
 +
This also works for radiobuttons.<br>
 
First you have to declare this constant<br>
 
First you have to declare this constant<br>
 
<pre>
 
<pre>
Line 27: Line 31:
 
</pre>
 
</pre>
 
<br>
 
<br>
The next piece of code sets the checkbox text at the left
+
The next piece of code sets the checkbox/radiobutton text at the left
 
<pre>
 
<pre>
 
Call VisWinSetStyle( hWndItem, BS_LEFTTEXT, TRUE )
 
Call VisWinSetStyle( hWndItem, BS_LEFTTEXT, TRUE )
 
</pre>
 
</pre>
 +
<br>
 +
[[image:CheckBoxTextLeft.png]]
 +
<br>
 +
<br>
 +
Here you can download a sample:<br>
 +
{{Download
 +
|URL=http://samples.tdcommunity.net/index.php?dir=&file=WIKI_CheckboxTextAtLeft.zip
 +
|TEXT=WIKI_CheckboxTextAtLeft.zip
 +
}}
 +
 +
 +
 +
 +
[[Category:Child Objects]]

Latest revision as of 10:19, 29 October 2013

CheckBox


Contents


Pointer2.png How to set value using only the window handle of a checkbox Pointer.png

First you have to declare this constant

Number: BM_SETCHECK   = 0x00F1


The next piece of code checks the checkbox

Call SalSendMsg( hWndItem, BM_SETCHECK, TRUE, 0 )

UnChecking

Call SalSendMsg( hWndItem, BM_SETCHECK, FALSE, 0 )


Pointer2.png How to set the checkbox text at the left Pointer.png

This also works for radiobuttons.
First you have to declare this constant

Number: BS_LEFTTEXT    = 0x00000020


The next piece of code sets the checkbox/radiobutton text at the left

Call VisWinSetStyle( hWndItem, BS_LEFTTEXT, TRUE )


CheckBoxTextLeft.png

Here you can download a sample:
Down.png WIKI_CheckboxTextAtLeft.zip