Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - QUESTION: Transparent UserControl on TabControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

QUESTION: Transparent UserControl on TabControl

 Post Reply Post Reply
Author
Message
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Topic: QUESTION: Transparent UserControl on TabControl
    Posted: 27 October 2008 at 5:08am
Transparency doesn't work with transparent usercontrols(ocx)?



All controls and the usercontrol are set to transparent.
The usercontrol itself is transparent, but not the controls on it, as you can see on the second screenshot.
Is there a way to solve this problem?
Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
Back to Top
JantjeKeizer View Drop Down
Groupie
Groupie


Joined: 12 February 2008
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote JantjeKeizer Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2008 at 5:27am
You can try to use a tabworkspace as background for the usercontrol, adding a single line in the resize event like:
tabworkspace.move 0 ,0 , usercontrol.scalewidth,usercontrol.scaleheight

i think that will work
Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2008 at 9:04am
Thank you.
Your solution only works correct, if the UserControl fills the whole TabPage.
But if the UserControl is only a part of the TabPage, then you will notice a problem with the gradient of the color.


Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
Back to Top
JantjeKeizer View Drop Down
Groupie
Groupie


Joined: 12 February 2008
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote JantjeKeizer Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2008 at 11:16am
Hmm, yes you are right.

If you are willing to do some ugly stuff here's a horrific 'workaround'

In your UC place this code

Sub Init(X As Single, Y As Single, Width As Single, Height As Single)
    TabControlPage1.Move 0 - X, 0 - Y, Width, Height
    Dim myControl As Control

    For Each myControl In UserControl.Controls

        If Not TypeOf myControl Is XtremeSuiteControls.TabControlPage Then
            On Error Resume Next
            myControl.Left = myControl.Left + X
            myControl.Top = myControl.Top + Y
            On Error GoTo 0
        End If

    Next

End Sub

Then in your calling form something like

Private Sub Form_Load()
    myControl.Init myControl.Left, myControl.Top, TabControlPage1.Width, TabControlPage1.Height
End Sub


But only if you really must.
Any other workaround or real solution will be better
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.391 seconds.