| View previous topic :: View next topic |
| Author |
Message |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Mon Feb 24, 2003 9:35 am Post subject: Why isn't this working and how to... |
|
|
OK, first question, when I open the about window and then click the close button, why does the program exit? I just want to close the about window, not the whole program.
And, secondly, how can I by clicking a button go to a specific tag in the tag object? Say I wanna go to the History tag in the about window.
| Code: | DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 24.02.2003 - 09:55 ***
DIALOG ADD,BUTTON,About,95,76,,,About
DIALOG SHOW
:Evloop
wait event
goto @event()
:AboutBUTTON
DIALOG CREATE,About,-1,0,356,310,NOSYS
REM *** Modified by Dialog Designer on 24.02.2003 - 10:24 ***
DIALOG ADD,TEXT,TEXT1,292,4,,,%%Copyright
DIALOG ADD,BUTTON,CloseAbout,280,286,64,24,Close
DIALOG ADD,SHAPE,SHAPE1,0,0,356,65,WHITE,BLACK,,RECTANGLE
DIALOG ADD,BITMAP,BITMAP1,1,244,112,64,E:\image.bmp
DIALOG ADD,TAB,TAB1,68,2,354,208,About|History|Thanks to|Beta testers
DIALOG SHOWMODAL
:CloseAboutBUTTON
DIALOG CLOSE
goto Evloop
:Close
exit |
_________________
 |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Feb 24, 2003 9:58 am Post subject: |
|
|
You are using a modal window. In the help file:
| Quote: | | When a button is pressed, the <button_name>BUTTON event is generated, but the dialog behaves as if it has been closed. |
So don't use your DIALOG CLOSE statement in :CloseAboutBUTTON - it will close your main window.
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Mon Feb 24, 2003 10:19 am Post subject: |
|
|
This didn't work either
| Code: | DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 24.02.2003 - 09:55 ***
DIALOG ADD,BUTTON,About,95,76,,,About
DIALOG SHOW
:Evloop
wait event
goto @event()
:AboutBUTTON
DIALOG CREATE,About,-1,0,356,310
REM *** Modified by Dialog Designer on 24.02.2003 - 10:24 ***
DIALOG ADD,TEXT,TEXT1,292,4,,,%%Copyright
DIALOG ADD,BUTTON,CloseAbout,280,286,64,24,Close
DIALOG ADD,SHAPE,SHAPE1,0,0,356,65,WHITE,BLACK,,RECTANGLE
DIALOG ADD,BITMAP,BITMAP1,1,244,112,64,E:\image.bmp
DIALOG ADD,TAB,TAB1,68,2,354,208,About|History|Thanks to|Beta testers
DIALOG SHOW
goto Evloop
:CloseAboutBUTTON
DIALOG SELECT,1
DIALOG CLOSE
DIALOG SELECT,0
goto Evloop
:Close
exit |
Any tips?
I want the about window to stay ontop. _________________
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Feb 24, 2003 10:30 am Post subject: |
|
|
Try this (from your first example):
| Code: |
DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 24.02.2003 - 09:55 ***
DIALOG ADD,BUTTON,About,95,76,,,About
DIALOG SHOW
:Evloop
wait event
goto @event()
:AboutBUTTON
DIALOG CREATE,About,-1,0,356,310,NOSYS
REM *** Modified by Dialog Designer on 24.02.2003 - 10:24 ***
DIALOG ADD,TEXT,TEXT1,292,4,,,%%Copyright
DIALOG ADD,BUTTON,CloseAbout,280,286,64,24,Close
DIALOG ADD,SHAPE,SHAPE1,0,0,356,65,WHITE,BLACK,,RECTANGLE
DIALOG ADD,BITMAP,BITMAP1,1,244,112,64,E:\image.bmp
DIALOG ADD,TAB,TAB1,68,2,354,208,About|History|Thanks to|Beta testers
DIALOG SHOWMODAL
dialog select,1
dialog close
:CloseAboutBUTTON
goto Evloop
:Close
exit
|
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing
Last edited by Dr. Dread on Mon Feb 24, 2003 10:49 am; edited 1 time in total |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Feb 24, 2003 10:31 am Post subject: |
|
|
One other thing - any time ya close a child window, it
leaves a live "CLOSE" event.
Ya hafta kill it with %e = @event() or something.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Mon Feb 24, 2003 10:37 am Post subject: |
|
|
Thanks alot guys
Now, about the tab object. See the first post.
I've tried tabs in VB but this doesn't work the same way.
Everything I add to the tab object shows up in everytime on runtime.
How do I show and hide the things when changing tabs?
And how to I use a button to open the about window in a certain tab?
Hope I'm not flooding you guys with questions  _________________
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Mon Feb 24, 2003 11:15 am Post subject: |
|
|
Wow, looks alittle complicated
Isn't there a way I can just go to simple action labels when clicking a tab? _________________
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Feb 24, 2003 11:18 am Post subject: |
|
|
Here's one I modified for someone - not sure who...
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
Title WP
DIALOG CREATE,Wp,-1,0,396,296
DIALOG ADD,TAB,TAB1,10,2,393,212,Windows Wallpaper|Wallpaper 2
DIALOG ADD,BUTTON,BUTTON1,225,2,392,44,Exit
DIALOG ADD,COMBO,List2,55,120,180,21,,,LIST,SORTED,CLICK
DIALOG ADD,STATUS,Stat,"Tab and Combo test"
DIALOG SHOW
goto Windows WallpaperCLICK
:EVLOOP
WAIT EVENT
goto @event()
:Windows WallpaperCLICK
DIALOG REMOVE, List2
DIALOG ADD,COMBO,List1,55,10,180,21,,,LIST,SORTED,CLICK
LIST FILELIST, List1, @windir()\*.bmp
goto EVLOOP
:Wallpaper 2CLICK
DIALOG REMOVE, List1
DIALOG ADD,COMBO,List2,55,120,180,21,,,LIST,SORTED,CLICK
LIST FILELIST, List2, @windir()\*.bmp
goto EVLOOP
:List1CLICK
goto EVLOOP
:List2CLICK
goto EVLOOP
:BUTTON1BUTTON
:CLOSE
EXIT
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Mon Feb 24, 2003 11:20 am Post subject: |
|
|
| If you click a TAB, there will be a Tab 1CLICK event. But you have to hide/unhide things to let it change from the one to another... |
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Mon Feb 24, 2003 11:27 am Post subject: |
|
|
That was much easier to understand. Thanks Mac and Skit  _________________
 |
|
| Back to top |
|
 |
|
|
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
|
|