Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Set enable property for all items on a SSTAB control
Old
  (#1)
T. Wintershoven
Guest
 
Posts: n/a
Default Set enable property for all items on a SSTAB control - 06-04-2007, 08:56 AM

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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Set enable property for all items on a SSTAB control
Old
  (#2)
Lee Weiner
Guest
 
Posts: n/a
Default Re: Set enable property for all items on a SSTAB control - 06-04-2007, 08:56 AM

In article <1071180412.430090@cache1>, "T. Wintershoven" <EMAIL REMOVED> 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
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Set enable property for all items on a SSTAB control
Old
  (#3)
T. Wintershoven
Guest
 
Posts: n/a
Default Re: Set enable property for all items on a SSTAB control - 06-04-2007, 08:56 AM

Good idea

Thanks

Tino

"Lee Weiner" <EMAIL REMOVED> wrote in message
news:a99Cb.25448$8y1.114114@attbi_s52...
> In article <1071180412.430090@cache1>, "T. Wintershoven"

<EMAIL REMOVED> 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



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Set enable property for all items on a SSTAB control
Old
  (#4)
Adheer Pai
Guest
 
Posts: n/a
Default Re: Set enable property for all items on a SSTAB control - 06-04-2007, 08:57 AM

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" <EMAIL REMOVED> 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
>
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top