By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,805 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,805 IT Pros & Developers. It's quick & easy.

Set enable property for all items on a SSTAB control

P: n/a
Hello,

In one of my projects i use a SSTAB object with a view controls on it
(textboxes and a checkbox).
I want to set the enable property for all the controls on the SSTAB object
to FALSE.
Not the SSTAB object itself.

Is there a faster way to do this than to set all controls on the SSTAB
seperately.

eg.
For each item/control in SSTAB<name>
-----
-----
Next

T.i.a.

Regards,
Tino Wintershoven
The Netherlands
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <1071180412.430090@cache1>, "T. Wintershoven" <pl*********@grp.com> wrote:
Hello,

In one of my projects i use a SSTAB object with a view controls on it
(textboxes and a checkbox).
I want to set the enable property for all the controls on the SSTAB object
to FALSE.
Not the SSTAB object itself.

Is there a faster way to do this than to set all controls on the SSTAB
seperately.

eg.
For each item/control in SSTAB<name>
-----
-----
Next


I learned a long time ago, the SSTab works best when you place a container, a
frame or a picture box, on each tab, and embed all the components in the
container. In this case, all you'd have to do is set the container's enabled
property to false and all contained components would be disabled.

Lee Weiner
lee AT leeweiner DOT org
Jul 17 '05 #2

P: n/a
Good idea

Thanks

Tino

"Lee Weiner" <le*@nospam.org> wrote in message
news:a99Cb.25448$8y1.114114@attbi_s52...
In article <1071180412.430090@cache1>, "T. Wintershoven" <pl*********@grp.com> wrote:
Hello,

In one of my projects i use a SSTAB object with a view controls on it
(textboxes and a checkbox).
I want to set the enable property for all the controls on the SSTAB objectto FALSE.
Not the SSTAB object itself.

Is there a faster way to do this than to set all controls on the SSTAB
seperately.

eg.
For each item/control in SSTAB<name>
-----
-----
Next


I learned a long time ago, the SSTab works best when you place a

container, a frame or a picture box, on each tab, and embed all the components in the
container. In this case, all you'd have to do is set the container's enabled property to false and all contained components would be disabled.

Lee Weiner
lee AT leeweiner DOT org

Jul 17 '05 #3

P: n/a
Here is the sample code ... add appropriate error handling

Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long

Private Sub cmdDisableSSTabControls_Click()

Dim controlOnForm As Control
For Each controlOnForm In Me.Controls
If (SSTab1.hwnd = GetParent(controlOnForm.hwnd)) Then
Call CallByName(controlOnForm, "Enabled", VbLet, False)
End If
Next

End Sub

"T. Wintershoven" <pl*********@grp.com> wrote in message
news:1071180412.430090@cache1...
Hello,

In one of my projects i use a SSTAB object with a view controls on it
(textboxes and a checkbox).
I want to set the enable property for all the controls on the SSTAB object
to FALSE.
Not the SSTAB object itself.

Is there a faster way to do this than to set all controls on the SSTAB
seperately.

eg.
For each item/control in SSTAB<name>
-----
-----
Next

T.i.a.

Regards,
Tino Wintershoven
The Netherlands

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.