forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Group background color changing...

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
NathanH
Valued Newbie


Joined: 05 Sep 2001
Posts: 32

PostPosted: Tue Jul 15, 2003 9:49 pm    Post subject: Group background color changing... Reply with quote

In WinXP Pro I'm trying to move a group onto a tab element, but the color of the background changes from white to grey when I hide the existing group and show the new one.

Code:

  DIALOG CREATE,New Dialog,-1,0,372,325
  DIALOG ADD,TAB,TAB1,4,5,365,278,Tab 1|Tab 2|Tab 3
  DIALOG ADD,GROUP,GROUP1,41,13,345,225,GROUP1
  DIALOG ADD,GROUP,GROUP2,1041,13,345,225,GROUP2
  DIALOG ADD,BUTTON,Test,293,165,64,24,Test
  DIALOG SHOW

:EvLoop
Wait Event
Goto @event()

:TestButton
DIALOG HIDE,GROUP1
DIALOG SETPOS,GROUP2,41,13
GOTO EvLoop

:Close


Any idea how to get around this...

Thanks,

Nathan
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Jul 16, 2003 4:41 am    Post subject: Reply with quote

Hi Nathan
I assume that U R using VDS 5 as XP theme is never applied to group element on TAB in VDS 4.x.
The whole problem i think is related to the fact that your second group is out of the Tab dialog element when the dialog is drawn and hence the white background style is not applied to it.
What I advice is that instead of moving out the group 2 in vertical axis you move it out in horizontal axis(else Ur OK button is caught with in the group) such that it is just within the tab element but out of the first group element(else group 2 includes group 1 and U get into trouble - conflicts may occur).
Now just after dialog show(Xp theme is applied) U move the second group totally out of sight.

Of course if U want the harder way U can use API and force the dialog to be redrawn once U show the second group(VDS 5) Wink but that is not needed as the above appears a simpler workaround Smile

Now Ur grups should work perfect:
See the code i modified:
Hope this helps , Let me know what happens...
Regards
Code:

DIALOG CREATE,New Dialog,-1,0,372,325
  DIALOG ADD,TAB,TAB1,4,5,365,278,Tab 1|Tab 2|Tab 3
  DIALOG ADD,GROUP,GROUP2,41,368,345,225,GROUP2
  DIALOG ADD,GROUP,GROUP1,41,13,345,225,GROUP1
  DIALOG ADD,BUTTON,Test,293,165,64,24,Test
  DIALOG SHOW
  DIALOG SETPOS,GROUP2,41,1090 
:EvLoop
Wait Event
Goto @event()

:TestButton
DIALOG SETPOS,GROUP1,41,1090
DIALOG SETPOS,GROUP2,41,13
WAIT 2
rem Just to shoe U its ok back also i added this
DIALOG SETPOS,GROUP2,41,1090
DIALOG SETPOS,GROUP1,41,13
GOTO EvLoop



:Close
exit

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
NathanH
Valued Newbie


Joined: 05 Sep 2001
Posts: 32

PostPosted: Wed Jul 16, 2003 5:47 am    Post subject: Reply with quote

Hi CodeScript,

I am using VDS 5, and your script works great. I took it one step further: having 5 tabs on my project, I could not place all the groups without overlapping, so I added 5 tab elements and move them with the groups. Rolling Eyes I hate all the extra coding for such trivial problem, but hey, it works and looks good and that's what counts in the end Wink

Appreciate the input!

Nathan
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Jul 16, 2003 3:24 pm    Post subject: Reply with quote

NathanH wrote:
Rolling Eyes I hate all the extra coding for such trivial problem,


Ummm.. I just added a SINGLE line to your script and I don't think many people consider it such a big addition like adding a section etc. unless ofcourse you are an assembly langauge programmer looking for a highly optimised smallest possible code. But here U end up distributing that fat 200+ kb vdsrun50.dll with your app Laughing
May be I explained a lot of unwanted theory Embarassed

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Jul 16, 2003 3:27 pm    Post subject: Reply with quote

NathanH wrote:
so I added 5 tab elements and move them with the groups.

I believe he was talking about his additions to the code, not yours.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
NathanH
Valued Newbie


Joined: 05 Sep 2001
Posts: 32

PostPosted: Wed Jul 16, 2003 4:17 pm    Post subject: Reply with quote

Yep, was talking about my code, and having to move in the tab elements and the groups (X5). I was just commenting that it's a lot of coding JUST to have the XP styles draw correctly. Nothing wrong with you code Code Script, certainly helped pointing me in the right direction...

Thanks again

Nathan
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Jul 16, 2003 4:27 pm    Post subject: Reply with quote

Smile
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group