Docking Toolbar in Top-Level Form

2006-06-29 Thread Bill Anderson


From Mike Feltman...


I don't have those session notes available online anywhere at present, but
at any rate, they didn't cover anything like this. I've never tried this,
but I believe here's what you'd need to do. I think the key is setting the
ShowWindow property of the Toolbar. 


of = Newobject([tlForm])
of.Show()

ot = Newobject([tlTB])
ot.Show()
ot.Dock(0)
SUSPEND

DEFINE CLASS tlForm AS Form
ShowWindow = 2
ENDDEFINE

DEFINE CLASS tlTB AS Toolbar
ShowWindow = 1

PROCEDURE Init
This.AddObject([Command1],[CommandButton])
This.Command1.Caption = [Button 1]
This.Command1.Visible = .T.
This.AddObject([Command2],[CommandButton])
This.Command2.Caption = [Button]
This.Command2.Visible = .T.

ENDPROC

ENDDEFINE

If you don't want the user to be able to move or undock the toolbar make
sure to set its movable property to false and put a NODEFAULT in the
DblClick method. 



Mike
-Original Message-
From: Bill Anderson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 5:08 PM

To: ProFox Email List
Subject: Re: Docking Toolbar in Top-Level Form

Profox wrote:

From: "Dave Crozier" <[EMAIL PROTECTED]>

Problem:
I'm trying to make a top level form in which a toolbar is dockable.


I just sold a VFP 9.0 to a newbie and was going to email him
some VFP sites to look at. One was www.foxite.com and on
the main page is a link to an article by Mike Feltman called:
"Everything You Ever Wanted to Know About Docking in VFP".

The article link points to LAFox.org, (LA user group), but I
don't see the article there. Maybe Bill Anderson could point
the way. 
I don't have support files for Mike's excellent presentation on June 13, 
but I've copied him on this email and I'll let you know...


Bill Anderson





--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.7/379 - Release Date: 6/29/2006






___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-29 Thread Mike Feltman
I don't have those session notes available online anywhere at present, but
at any rate, they didn't cover anything like this. I've never tried this,
but I believe here's what you'd need to do. I think the key is setting the
ShowWindow property of the Toolbar. 

of = Newobject([tlForm])
of.Show()

ot = Newobject([tlTB])
ot.Show()
ot.Dock(0)
SUSPEND

DEFINE CLASS tlForm AS Form
ShowWindow = 2
ENDDEFINE

DEFINE CLASS tlTB AS Toolbar
ShowWindow = 1

PROCEDURE Init
This.AddObject([Command1],[CommandButton])
This.Command1.Caption = [Button 1]
This.Command1.Visible = .T.
This.AddObject([Command2],[CommandButton])
This.Command2.Caption = [Button]
This.Command2.Visible = .T.

ENDPROC

ENDDEFINE

If you don't want the user to be able to move or undock the toolbar make
sure to set its movable property to false and put a NODEFAULT in the
DblClick method. 


Mike
-Original Message-
From: Bill Anderson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 5:08 PM
To: ProFox Email List
Subject: Re: Docking Toolbar in Top-Level Form

Profox wrote:
> From: "Dave Crozier" <[EMAIL PROTECTED]>
>> Problem:
>> I'm trying to make a top level form in which a toolbar is dockable.
>
> I just sold a VFP 9.0 to a newbie and was going to email him
> some VFP sites to look at. One was www.foxite.com and on
> the main page is a link to an article by Mike Feltman called:
> "Everything You Ever Wanted to Know About Docking in VFP".
>
> The article link points to LAFox.org, (LA user group), but I
> don't see the article there. Maybe Bill Anderson could point
> the way. 
I don't have support files for Mike's excellent presentation on June 13, 
but I've copied him on this email and I'll let you know...

Bill Anderson




___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-29 Thread Dave Crozier
Most certainly - probably!

Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ted Roche
Sent: 29 June 2006 16:47
To: profox@leafe.com
Subject: Re: Docking Toolbar in Top-Level Form

On 6/28/06, Dave Crozier <[EMAIL PROTECTED]> wrote:
>
> OR at lease modify it, in that the problem of the toolbar docking in 
> the main VFP window was caused by having the Debugger active. I guess 
> that the Debugger this must obviously reset the TopForm to the main 
> VFP and consequently the toolbar goes and docks itself with the main
Window.
>

Ah, a Heisenbug!

--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Docking Toolbar in Top-Level Form

2006-06-29 Thread Ted Roche

On 6/28/06, Dave Crozier <[EMAIL PROTECTED]> wrote:


OR at lease modify it, in that the problem of the toolbar docking in the
main VFP window was caused by having the Debugger active. I guess that the
Debugger this must obviously reset the TopForm to the main VFP and
consequently the toolbar goes and docks itself with the main Window.



Ah, a Heisenbug!

--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-29 Thread Allen
I think you need to be careful with the debugger. It can have the effect of
making modal forms in top level forms appear on the desktop so it could be
the same for toolbars. I'm sure I designed my toolbar visually and the form
and it works.
Allen 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Crozier
Sent: 28 June 2006 18:32
To: [EMAIL PROTECTED]
Subject: RE: Docking Toolbar in Top-Level Form

Having solved the problem I have to retract my previous statement:

"Having investigated the problem further and unless anyone can prove me
wrong, there is no way of having a visually designed Form with a visually
designed toolbar which is docked in the aforesaid form and to run it in
development mode to see the final result i.e the toolbar DOCKED IN the
form."

OR at lease modify it, in that the problem of the toolbar docking in the
main VFP window was caused by having the Debugger active. I guess that the
Debugger this must obviously reset the TopForm to the main VFP and
consequently the toolbar goes and docks itself with the main Window.

Removing my breakpoint cured the error instantly. One to remember for the
future. Anyhow, thanks to all for their input.

Dave Crozier



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-29 Thread Andy Davies
> ...caused by having the Debugger active.

don'cha just *love* those!

Andrew Davies  MBCS CITP
  - AndyD    8-)#


**

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.

Please contact [EMAIL PROTECTED] with any queries.

**



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Docking Toolbar in Top-Level Form

2006-06-28 Thread Bill Anderson

Profox wrote:

From: "Dave Crozier" <[EMAIL PROTECTED]>

Problem:
I'm trying to make a top level form in which a toolbar is dockable.


I just sold a VFP 9.0 to a newbie and was going to email him
some VFP sites to look at. One was www.foxite.com and on
the main page is a link to an article by Mike Feltman called:
"Everything You Ever Wanted to Know About Docking in VFP".

The article link points to LAFox.org, (LA user group), but I
don't see the article there. Maybe Bill Anderson could point
the way. 
I don't have support files for Mike's excellent presentation on June 13, 
but I've copied him on this email and I'll let you know...


Bill Anderson


___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Docking Toolbar in Top-Level Form

2006-06-28 Thread Profox

I just sold a VFP 9.0 to a newbie and was going to email him
some VFP sites to look at. One was www.foxite.com and on
the main page is a link to an article by Mike Feltman called:
"Everything You Ever Wanted to Know About Docking in VFP".

The article link points to LAFox.org, (LA user group), but I
don't see the article there. Maybe Bill Anderson could point
the way.

Jim Eddins



I just looked at foxite.com and didn't see the link you refer to, but at
http://f1technologies.blogspot.com/ Mike has a blog entry titled "Taming
Dockable Toolbars".

Regards,
Jim


The link I referred to on www.foxite.com is under the "Latest Community
News" section. I just re-checked and it's still there.

Jim Eddins



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-28 Thread Dave Crozier
Having solved the problem I have to retract my previous statement:

"Having investigated the problem further and unless anyone can prove me
wrong, there is no way of having a visually designed Form with a visually
designed toolbar which is docked in the aforesaid form and to run it in
development mode to see the final result i.e the toolbar DOCKED IN the
form."

OR at lease modify it, in that the problem of the toolbar docking in the
main VFP window was caused by having the Debugger active. I guess that the
Debugger this must obviously reset the TopForm to the main VFP and
consequently the toolbar goes and docks itself with the main Window.

Removing my breakpoint cured the error instantly. One to remember for the
future. Anyhow, thanks to all for their input.

Dave Crozier

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Richard Kaye
Sent: 28 June 2006 18:01
To: profox@leafe.com
Subject: Re: Docking Toolbar in Top-Level Form

And for a quick tip on docking from Mike, check his blog entry of June 16

<http://f1technologies.blogspot.com/>

Profox wrote:
> From: "Dave Crozier" <[EMAIL PROTECTED]>
>> Problem:
>> I'm trying to make a top level form in which a toolbar is dockable.
>
> I just sold a VFP 9.0 to a newbie and was going to email him
> some VFP sites to look at. One was www.foxite.com and on
> the main page is a link to an article by Mike Feltman called:
> "Everything You Ever Wanted to Know About Docking in VFP".
>
> The article link points to LAFox.org, (LA user group), but I
> don't see the article there. Maybe Bill Anderson could point
> the way.
>
> Jim Eddins

-- 
Richard Kaye
Artfact/RFC Systems
Voice: 617.219.1038

For the fastest response time, please send your support
queries to:

Technical Support - [EMAIL PROTECTED]
Australian Support - [EMAIL PROTECTED]
Internet Support - [EMAIL PROTECTED]
All Other Requests - [EMAIL PROTECTED]

-
This message has been checked for viruses before sending.
-



[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Docking Toolbar in Top-Level Form

2006-06-28 Thread Richard Kaye

And for a quick tip on docking from Mike, check his blog entry of June 16



Profox wrote:

From: "Dave Crozier" <[EMAIL PROTECTED]>

Problem:
I'm trying to make a top level form in which a toolbar is dockable.


I just sold a VFP 9.0 to a newbie and was going to email him
some VFP sites to look at. One was www.foxite.com and on
the main page is a link to an article by Mike Feltman called:
"Everything You Ever Wanted to Know About Docking in VFP".

The article link points to LAFox.org, (LA user group), but I
don't see the article there. Maybe Bill Anderson could point
the way.

Jim Eddins


--
Richard Kaye
Artfact/RFC Systems
Voice: 617.219.1038

For the fastest response time, please send your support
queries to:

Technical Support - [EMAIL PROTECTED]
Australian Support - [EMAIL PROTECTED]
Internet Support - [EMAIL PROTECTED]
All Other Requests - [EMAIL PROTECTED]

-
This message has been checked for viruses before sending.
-



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-28 Thread Jim Winter
> 
> I just sold a VFP 9.0 to a newbie and was going to email him
> some VFP sites to look at. One was www.foxite.com and on
> the main page is a link to an article by Mike Feltman called:
> "Everything You Ever Wanted to Know About Docking in VFP".
> 
> The article link points to LAFox.org, (LA user group), but I
> don't see the article there. Maybe Bill Anderson could point
> the way.
> 
> Jim Eddins
> 

I just looked at foxite.com and didn't see the link you refer to, but at
http://f1technologies.blogspot.com/ Mike has a blog entry titled "Taming
Dockable Toolbars".

Regards,
Jim



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Docking Toolbar in Top-Level Form

2006-06-28 Thread Profox

From: "Dave Crozier" <[EMAIL PROTECTED]>

Problem:
I'm trying to make a top level form in which a toolbar is dockable.


I just sold a VFP 9.0 to a newbie and was going to email him
some VFP sites to look at. One was www.foxite.com and on
the main page is a link to an article by Mike Feltman called:
"Everything You Ever Wanted to Know About Docking in VFP".

The article link points to LAFox.org, (LA user group), but I
don't see the article there. Maybe Bill Anderson could point
the way.

Jim Eddins



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Sietse Wijnker
Hi Dave,
I have the following code running with a visually designed form and toolbar.
The code was generated from the SCX and VCX using the class-browser and
trimmed down to it's bare essentials.

Regards,
Sietse Wijnker

PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form
ShowWindow = 2
PROCEDURE Activate
IF TYPE([This.TB.Name]) <> [C] THEN
This.AddProperty("tb", CREATEOBJECT("tb"))
This.tb.Visible = .F.
ENDIF
IF NOT This.tb.Visible THEN
This.tb.Dock(0)
This.tb.Show()
ENDIF
ENDPROC
ENDDEFINE
DEFINE CLASS tb AS toolbar
ShowWindow = 1
ADD OBJECT command1 AS commandbutton WITH ;
Caption = "..."
ENDDEFINE


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Crozier
> Sent: dinsdag 27 juni 2006 17:33
> To: [EMAIL PROTECTED]
> Subject: RE: Docking Toolbar in Top-Level Form
> 
> To All,
> Having investigated the problem further and unless anyone can 
> prove me wrong, there is no way of having a visually designed 
> Form with a visually designed toolbar which is docked in the 
> aforesaid form and to run it in development mode to see the 
> final result i.e the toolbar DOCKED IN the form.
> 
> 
> The main VFP screen seems to take control as the top level 
> form and the toolbar will ALWAYS dock with the main VFP 
> window regardless of which property settings you use.
> 
> One lesson learnt.
> 
> Dave Crozier
> "A computer is a stupid machine with the ability to do 
> incredibly smart things, while computer programmers are smart 
> people with the ability to do incredibly stupid things. They 
> are, in short, a perfect match"  - Bill Bryson
>  
> 
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Crozier
> Sent: 27 June 2006 15:47
> To: 'ProFox Email List'
> Subject: RE: Docking Toolbar in Top-Level Form
> 
> Rafael,
> Solved the Problem. I needed to define the Toolbar as a class 
> in its own right and set the ShowWindow property accordingly.
> Also, I just noticed the post from Rick which says the same 
> thing. Funny that as in my application I use a visually 
> designed class that is subclassed from a standard toolbar. 
> Only in the subclass is the ShowWindow set to 1 and this is 
> why it didn't work. 
> 
> Creating the class as the original toolbar where Showwindow 
> is 0 screws everything else up even though I had the 
> subclassed item set correctly.
>  
> * Test Program for toolbars
> oForm=CreateObject("clsForm")
> With oForm
>   .Width=200
>   .Height=200
>   .AutoCenter=.T.
>   *
>   .Visible=.T.
>   *
> Endwith
> *
> Read events
> 
>   
> Define Class clsForm as Form
> ShowWindow=2 && Top Level
> Desktop=.T.
>   
>   Function Activate()
>   * See if the toolbar exists
>   * ...So I can rename init() as Activare for testing
>   *
>   If type("This.barToolbar")<>"O"
>   This.AddProperty("barToolbar2")
>   This.barToolbar2=CreateObject("clsMyToolbar")
>   With This.barToolbar2 as toolbar
>   .Dock(0)
>   .Show()
>   Endwith
>   Endif
>   *
>   Endfunc
>   
>   Function Unload()
>   Clear Events
>   Endfunc
>   *
>   *
> Enddefine
> 
> Define Class clsMyToolbar as Toolbar
> ShowWindow=1
> 
>   Function Init()
>   With This
>   .AddObject("btnButton1","CommandButton")
>   .btnButton1.Visible=.T.
>   .btnButton1.Height=30
>   *
>   .AddObject("btnButton2","CommandButton")
>   .btnButton2.Visible=.T.
>   .btnButton2.Height=30
>   *
>   Endwith
>   *
>   Endfunc
>   *
> Enddefine
> 
> 
> Dave Crozier
> "A computer is a stupid machine with the ability to do 
> incredibly smart things, while computer programmers are smart 
> people with the ability to do incredibly stupid things. They 
> are, in short, a perfect match"  - Bill Bryson
>  
> 
> --
&g

RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Dave Crozier
Malcolm,
I think you are correct - definitely a lot of trouble. I'll sleep on it as
I've got a working solution now so no great sweat! 


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Malcolm Greene
Sent: 27 June 2006 16:47
To: profox@leafe.com
Subject: RE: Docking Toolbar in Top-Level Form

Dave,

> Having investigated the problem further and unless anyone can prove me
wrong, there is no way of having a visually designed Form with a visually
designed toolbar which is docked in the aforesaid form.

The same principle applies to the VFP statusbar and menubar as well.

One possible solution, albeit more complicated than its probably worth

1. Create placeholder container classes for your menubar, toolbars and
statusbar so that these items take up physical space on your design form.
Note that the menubar and statusbar containers won't automatically adjust
their heights based on system menu font settings but a builder could do
this.

2. Place your tradional form contents in its own container.

3. In your form Init():
- remove the placeholder containers
- shift the main form container to 0,0
- resize the form to account for the removed placeholder containers

As I said ... seems more trouble than its worth?

Malcolm


[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Malcolm Greene
Dave,

> Having investigated the problem further and unless anyone can prove me wrong, 
> there is no way of having a visually designed Form with a visually designed 
> toolbar which is docked in the aforesaid form.

The same principle applies to the VFP statusbar and menubar as well.

One possible solution, albeit more complicated than its probably
worth

1. Create placeholder container classes for your menubar, toolbars and
statusbar so that these items take up physical space on your design
form. Note that the menubar and statusbar containers won't automatically
adjust their heights based on system menu font settings but a builder
could do this.

2. Place your tradional form contents in its own container.

3. In your form Init():
- remove the placeholder containers 
- shift the main form container to 0,0
- resize the form to account for the removed placeholder containers

As I said ... seems more trouble than its worth?

Malcolm


___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Dave Crozier
To All,
Having investigated the problem further and unless anyone can prove me
wrong, there is no way of having a visually designed Form with a visually
designed toolbar which is docked in the aforesaid form and to run it in
development mode to see the final result i.e the toolbar DOCKED IN the form.


The main VFP screen seems to take control as the top level form and the
toolbar will ALWAYS dock with the main VFP window regardless of which
property settings you use.

One lesson learnt.

Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Dave Crozier
Sent: 27 June 2006 15:47
To: 'ProFox Email List'
Subject: RE: Docking Toolbar in Top-Level Form

Rafael,
Solved the Problem. I needed to define the Toolbar as a class in its own
right and set the ShowWindow property accordingly.
Also, I just noticed the post from Rick which says the same thing. Funny
that as in my application I use a visually designed class that is subclassed
from a standard toolbar. Only in the subclass is the ShowWindow set to 1 and
this is why it didn't work. 

Creating the class as the original toolbar where Showwindow is 0 screws
everything else up even though I had the subclassed item set correctly.
 
* Test Program for toolbars
oForm=CreateObject("clsForm")
With oForm
.Width=200
.Height=200
.AutoCenter=.T.
*
.Visible=.T.
*
Endwith
*
Read events


Define Class clsForm as Form
ShowWindow=2 && Top Level
Desktop=.T.

Function Activate()
* See if the toolbar exists
* ...So I can rename init() as Activare for testing
*
If type("This.barToolbar")<>"O"
This.AddProperty("barToolbar2")
This.barToolbar2=CreateObject("clsMyToolbar")
With This.barToolbar2 as toolbar
.Dock(0)
.Show()
Endwith
Endif
*
Endfunc

Function Unload()
Clear Events
Endfunc
*
*
Enddefine

Define Class clsMyToolbar as Toolbar
ShowWindow=1

Function Init()
With This
.AddObject("btnButton1","CommandButton")
.btnButton1.Visible=.T.
.btnButton1.Height=30
*
.AddObject("btnButton2","CommandButton")
.btnButton2.Visible=.T.
.btnButton2.Height=30
*
Endwith
*
Endfunc
*
Enddefine


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 26/06/2006
 




[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Docking Toolbar in Top-Level Form

2006-06-27 Thread Rafael Copquin
Yes, well, it is true. The toolbar is in reality a special kind of form IMO 
and its showwindow property should be in top level form. As a matter of fact 
I just looked at my own toolbar class and of course, the showwindow property 
is 1.


Glad you could solve it.

Rafael

- Original Message - 
From: "Dave Crozier" <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 27, 2006 11:47 AM
Subject: RE: Docking Toolbar in Top-Level Form



Rafael,
Solved the Problem. I needed to define the Toolbar as a class in its own
right and set the ShowWindow property accordingly.
Also, I just noticed the post from Rick which says the same thing. Funny
that as in my application I use a visually designed class that is 
subclassed
from a standard toolbar. Only in the subclass is the ShowWindow set to 1 
and

this is why it didn't work.

Creating the class as the original toolbar where Showwindow is 0 screws
everything else up even though I had the subclassed item set correctly.

* Test Program for toolbars
oForm=CreateObject("clsForm")
With oForm
.Width=200
.Height=200
.AutoCenter=.T.
*
.Visible=.T.
*
Endwith
*
Read events


Define Class clsForm as Form
ShowWindow=2 && Top Level
Desktop=.T.

Function Activate()
* See if the toolbar exists
* ...So I can rename init() as Activare for testing
*
If type("This.barToolbar")<>"O"
This.AddProperty("barToolbar2")
This.barToolbar2=CreateObject("clsMyToolbar")
With This.barToolbar2 as toolbar
.Dock(0)
.Show()
Endwith
Endif
*
Endfunc

Function Unload()
Clear Events
Endfunc
*
*
Enddefine

Define Class clsMyToolbar as Toolbar
ShowWindow=1

Function Init()
With This
.AddObject("btnButton1","CommandButton")
.btnButton1.Visible=.T.
.btnButton1.Height=30
*
.AddObject("btnButton2","CommandButton")
.btnButton2.Visible=.T.
.btnButton2.Height=30
*
Endwith
*
Endfunc
*
Enddefine


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 26/06/2006






[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Dave Crozier
Rafael,
Solved the Problem. I needed to define the Toolbar as a class in its own
right and set the ShowWindow property accordingly.
Also, I just noticed the post from Rick which says the same thing. Funny
that as in my application I use a visually designed class that is subclassed
from a standard toolbar. Only in the subclass is the ShowWindow set to 1 and
this is why it didn't work. 

Creating the class as the original toolbar where Showwindow is 0 screws
everything else up even though I had the subclassed item set correctly.
 
* Test Program for toolbars
oForm=CreateObject("clsForm")
With oForm
.Width=200
.Height=200
.AutoCenter=.T.
*
.Visible=.T.
*
Endwith
*
Read events


Define Class clsForm as Form
ShowWindow=2 && Top Level
Desktop=.T.

Function Activate()
* See if the toolbar exists
* ...So I can rename init() as Activare for testing
*
If type("This.barToolbar")<>"O"
This.AddProperty("barToolbar2")
This.barToolbar2=CreateObject("clsMyToolbar")
With This.barToolbar2 as toolbar
.Dock(0)
.Show()
Endwith
Endif
*
Endfunc

Function Unload()
Clear Events
Endfunc
*
*
Enddefine

Define Class clsMyToolbar as Toolbar
ShowWindow=1

Function Init()
With This
.AddObject("btnButton1","CommandButton")
.btnButton1.Visible=.T.
.btnButton1.Height=30
*
.AddObject("btnButton2","CommandButton")
.btnButton2.Visible=.T.
.btnButton2.Height=30
*
Endwith
*
Endfunc
*
Enddefine


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 26/06/2006
 




___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Docking Toolbar in Top-Level Form

2006-06-27 Thread Rafael Copquin

I just re read your original post


If I create a form which is set as a "Top-Level" with Desktop=.T. and add


Did you try desktop = .f.?

That is what I use.



Rafael




- Original Message - 
From: "Dave Crozier" <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 27, 2006 11:22 AM
Subject: RE: Docking Toolbar in Top-Level Form



Rafael,
I still have the same problem - The sample below just docks the toolbar on
the main VFP window

**
* Test Program for toolbars
*
oForm=CreateObject("clsForm")
With oForm
  .Width=200
  .Height=200
  .AutoCenter=.T.
  *
  .Visible=.T.
  *
Endwith
*
Read events


Define Class clsForm as Form
ShowWindow=2 && Top Level

  Function Activate()
 * See if the toolbar exists
 * ...So I can rename init() as Activare for testing
 *
 If type("This.barToolbar")<>"O"
This.AddProperty("barToolbar2")
This.barToolbar2=CreateObject("Toolbar")
With This.barToolbar2 as toolbar
   .AddObject("btnButton1","CommandButton")
   .btnButton1.Visible=.T.
   *
   .Dock(0)
   .Show()
Endwith
 Endif
 *
 Endfunc

 Function Unload()
Clear Events
 Endfunc
 *
 *
Enddefine
*
* End of Code
***


Dave Crozier




___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Rick Schummer
You have to make sure the toolbar.ShowWindow = 1 (In Top Level Form)

Rick
White Light Computing, Inc.

www.whitelightcomputing.com
www.rickschummer.com
586.254.2530 - office
586.254.2539 - fax
  

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave
Crozier
Sent: Tuesday, June 27, 2006 10:23 AM
To: [EMAIL PROTECTED]
Subject: RE: Docking Toolbar in Top-Level Form

Rafael,
I still have the same problem - The sample below just docks the toolbar on the 
main VFP
window

**
* Test Program for toolbars
*
oForm=CreateObject("clsForm")
With oForm
   .Width=200
   .Height=200
   .AutoCenter=.T.
   *
   .Visible=.T.
   *
Endwith
*
Read events


Define Class clsForm as Form
ShowWindow=2 && Top Level

   Function Activate()
  * See if the toolbar exists
  * ...So I can rename init() as Activare for testing
  *
  If type("This.barToolbar")<>"O"
 This.AddProperty("barToolbar2")
 This.barToolbar2=CreateObject("Toolbar")
 With This.barToolbar2 as toolbar
.AddObject("btnButton1","CommandButton")
.btnButton1.Visible=.T.
*
.Dock(0)
.Show()
 Endwith
  Endif
  *
  Endfunc

  Function Unload()
 Clear Events
  Endfunc
  *
  *
Enddefine
*
* End of Code
***


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Rafael Copquin
Sent: 27 June 2006 14:40
To: profox@leafe.com
Subject: Re: Docking Toolbar in Top-Level Form

I use a top level form as the background for my applications and dock a
custom made toolbar which is used by all the forms launched from the menu.

This is the code I use in the ACTIVATE method of the TLF

If this.lFirstTime = .t.
this.lFirstTime = .f.
this.LockScreen = .t.


   ** the next two lines center the company logo on the TLF (which has a
windowsstate property of 2 (maximized) )

this.logo.Left = (Sysmetric(1) - this.logo.Width ) / 2
this.logo.top = (Sysmetric(2) - this.logo.Height) / 2

application.Visible = .f. && 
place this here to avoid initial flicker
this.LockScreen = .f.
If Vartype(this.oToolBar) <> "O"
this.oToolBar = createobject("myToolBar")
this.oToolBar.dock(0)
this.oToolBar.show()
endif
Release Menus (this.Name) extended  && not really needed 
but.
Do general.mpr with this,.t.
EndIf

As you can see, the lFirstTime property causes both the toolbar and the menu
to show when the TLF activates. The toolbar is always there (as is the menu)
and is used by all forms that need it. When they do not need it, the form
class deactivates de toolbar, leaving only the exit button enabled. The
toolbar has navigation buttons, add,delete,cancel,edit,charts,word,excel,
etc. buttons and also an exit button.

Rafael Copquin
www.copquin.com.ar
Universal Thread Magazine - Translation Coordinator Treasurer - Microsoft
Users Group of Argentina (MUG) www.mug.org.ar




- Original Message -----
From: "Dave Crozier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 27, 2006 10:16 AM
Subject: Docking Toolbar in Top-Level Form


> Problem:
> I'm trying to make a top level form in which a toolbar is dockable.
>
> So Far:
> If I create a form which is set as a "Top-Level" with Desktop=.T. and add 
> a
> toolbar in the init() of the form as follows:
>
> With This
> .AddProperty("barToolbar")
> .barToolbar=NewObject("Organiser_Toolbar","stdControls")
> .barToolbar.Visible=.T.
>
> * Bind My Event to the first Toolbar Button
> * This binding fires correctly
> =BindEvent(Thisform.barToolbar.btnOpen,"Click",This,"btnOpen")
> *
> Endwith
> *
> Return
>
> The toolbar is created but will only dock with the main VFP window and not
> the new top-level form I created. So, how do I make the new top level form
> the place where the toolbar will dock? I have the feeling I've missed
> something really basic here - but I can't think what.
>
> Anyone any ideas as I've never really got into toolbars and I know there 
> are
> a few "gotcha's"?
>
>
> Dave Crozier
> "A computer is a stupid machine with the ability to do incredibly smart
> things, while computer programmers are smart people with the ability to do
> incredibly stupid things. They are, in 

RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Dave Crozier
Rafael,
I still have the same problem - The sample below just docks the toolbar on
the main VFP window

**
* Test Program for toolbars
*
oForm=CreateObject("clsForm")
With oForm
   .Width=200
   .Height=200
   .AutoCenter=.T.
   *
   .Visible=.T.
   *
Endwith
*
Read events


Define Class clsForm as Form
ShowWindow=2 && Top Level

   Function Activate()
  * See if the toolbar exists
  * ...So I can rename init() as Activare for testing
  *
  If type("This.barToolbar")<>"O"
 This.AddProperty("barToolbar2")
 This.barToolbar2=CreateObject("Toolbar")
 With This.barToolbar2 as toolbar
.AddObject("btnButton1","CommandButton")
.btnButton1.Visible=.T.
*
.Dock(0)
.Show()
 Endwith
  Endif
  *
  Endfunc

  Function Unload()
 Clear Events
  Endfunc
  *
  *
Enddefine 
*
* End of Code
***


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Rafael Copquin
Sent: 27 June 2006 14:40
To: profox@leafe.com
Subject: Re: Docking Toolbar in Top-Level Form

I use a top level form as the background for my applications and dock a
custom made toolbar which is used by all the forms launched from the menu.

This is the code I use in the ACTIVATE method of the TLF

If this.lFirstTime = .t.
this.lFirstTime = .f.
this.LockScreen = .t.


   ** the next two lines center the company logo on the TLF (which has a
windowsstate property of 2 (maximized) )

this.logo.Left = (Sysmetric(1) - this.logo.Width ) / 2
this.logo.top = (Sysmetric(2) - this.logo.Height) / 2

application.Visible = .f. && 
place this here to avoid initial flicker
this.LockScreen = .f.
If Vartype(this.oToolBar) <> "O"
this.oToolBar = createobject("myToolBar")
this.oToolBar.dock(0)
this.oToolBar.show()
endif
Release Menus (this.Name) extended  && not really needed 
but.
Do general.mpr with this,.t.
EndIf

As you can see, the lFirstTime property causes both the toolbar and the menu
to show when the TLF activates. The toolbar is always there (as is the menu)
and is used by all forms that need it. When they do not need it, the form
class deactivates de toolbar, leaving only the exit button enabled. The
toolbar has navigation buttons, add,delete,cancel,edit,charts,word,excel,
etc. buttons and also an exit button.

Rafael Copquin
www.copquin.com.ar
Universal Thread Magazine - Translation Coordinator Treasurer - Microsoft
Users Group of Argentina (MUG) www.mug.org.ar




- Original Message -----
From: "Dave Crozier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 27, 2006 10:16 AM
Subject: Docking Toolbar in Top-Level Form


> Problem:
> I'm trying to make a top level form in which a toolbar is dockable.
>
> So Far:
> If I create a form which is set as a "Top-Level" with Desktop=.T. and add 
> a
> toolbar in the init() of the form as follows:
>
> With This
> .AddProperty("barToolbar")
> .barToolbar=NewObject("Organiser_Toolbar","stdControls")
> .barToolbar.Visible=.T.
>
> * Bind My Event to the first Toolbar Button
> * This binding fires correctly
> =BindEvent(Thisform.barToolbar.btnOpen,"Click",This,"btnOpen")
> *
> Endwith
> *
> Return
>
> The toolbar is created but will only dock with the main VFP window and not
> the new top-level form I created. So, how do I make the new top level form
> the place where the toolbar will dock? I have the feeling I've missed
> something really basic here - but I can't think what.
>
> Anyone any ideas as I've never really got into toolbars and I know there 
> are
> a few "gotcha's"?
>
>
> Dave Crozier
> "A computer is a stupid machine with the ability to do incredibly smart
> things, while computer programmers are smart people with the ability to do
> incredibly stupid things. They are, in short, a perfect match"  - Bill
> Bryson
>
>
> -- 
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 26/06/2006
>
>
>
>
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Docking Toolbar in Top-Level Form

2006-06-27 Thread Rafael Copquin
I use a top level form as the background for my applications and dock a 
custom made toolbar which is used by all the forms launched from the menu.


This is the code I use in the ACTIVATE method of the TLF

If this.lFirstTime = .t.
   this.lFirstTime = .f.
   this.LockScreen = .t.


  ** the next two lines center the company logo on the TLF (which has a 
windowsstate property of 2 (maximized) )


   this.logo.Left = (Sysmetric(1) - this.logo.Width ) / 2
   this.logo.top = (Sysmetric(2) - this.logo.Height) / 2

   application.Visible = .f. && 
place this here to avoid initial flicker

   this.LockScreen = .f.
   If Vartype(this.oToolBar) <> "O"
   this.oToolBar = createobject("myToolBar")
   this.oToolBar.dock(0)
   this.oToolBar.show()
   endif
   Release Menus (this.Name) extended  && not really needed 
but.

   Do general.mpr with this,.t.
EndIf

As you can see, the lFirstTime property causes both the toolbar and the menu 
to show when the TLF activates. The toolbar is always there (as is the menu) 
and is used by all forms that need it. When they do not need it, the form 
class deactivates de toolbar, leaving only the exit button enabled. The 
toolbar has navigation buttons, add,delete,cancel,edit,charts,word,excel, 
etc. buttons and also an exit button.


Rafael Copquin
www.copquin.com.ar
Universal Thread Magazine - Translation Coordinator
Treasurer - Microsoft Users Group of Argentina (MUG)
www.mug.org.ar




- Original Message - 
From: "Dave Crozier" <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 27, 2006 10:16 AM
Subject: Docking Toolbar in Top-Level Form



Problem:
I'm trying to make a top level form in which a toolbar is dockable.

So Far:
If I create a form which is set as a "Top-Level" with Desktop=.T. and add 
a

toolbar in the init() of the form as follows:

With This
.AddProperty("barToolbar")
.barToolbar=NewObject("Organiser_Toolbar","stdControls")
.barToolbar.Visible=.T.

* Bind My Event to the first Toolbar Button
* This binding fires correctly
=BindEvent(Thisform.barToolbar.btnOpen,"Click",This,"btnOpen")
*
Endwith
*
Return

The toolbar is created but will only dock with the main VFP window and not
the new top-level form I created. So, how do I make the new top level form
the place where the toolbar will dock? I have the feeling I've missed
something really basic here - but I can't think what.

Anyone any ideas as I've never really got into toolbars and I know there 
are

a few "gotcha's"?


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 26/06/2006






[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Allen
I have toolbars docking in top level. I didn't do an AddProperty though. I
did an thisform.createobject on my toolbar class
Allen 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Crozier
Sent: 27 June 2006 14:16
To: [EMAIL PROTECTED]
Subject: Docking Toolbar in Top-Level Form

Problem: 
I'm trying to make a top level form in which a toolbar is dockable. 

So Far:
If I create a form which is set as a "Top-Level" with Desktop=.T. and add a
toolbar in the init() of the form as follows:

With This
.AddProperty("barToolbar")
.barToolbar=NewObject("Organiser_Toolbar","stdControls")
.barToolbar.Visible=.T.

* Bind My Event to the first Toolbar Button
* This binding fires correctly
=BindEvent(Thisform.barToolbar.btnOpen,"Click",This,"btnOpen")
*
Endwith 
*
Return



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Docking Toolbar in Top-Level Form

2006-06-27 Thread Dave Crozier
...and I forgot I have the toolbar ShowInWindow property set to 1 i.e (The
form is a child form of the active top-level form...)

I thought this would have made the toolbar a child of my Desktop formbut
no.

Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Dave Crozier
Sent: 27 June 2006 14:16
To: 'ProFox Email List'
Subject: Docking Toolbar in Top-Level Form

Problem: 
I'm trying to make a top level form in which a toolbar is dockable. 

So Far:
If I create a form which is set as a "Top-Level" with Desktop=.T. and add a
toolbar in the init() of the form as follows:

With This
.AddProperty("barToolbar")
.barToolbar=NewObject("Organiser_Toolbar","stdControls")
.barToolbar.Visible=.T.

* Bind My Event to the first Toolbar Button
* This binding fires correctly
=BindEvent(Thisform.barToolbar.btnOpen,"Click",This,"btnOpen")
*
Endwith
*
Return

The toolbar is created but will only dock with the main VFP window and not
the new top-level form I created. So, how do I make the new top level form
the place where the toolbar will dock? I have the feeling I've missed
something really basic here - but I can't think what.

Anyone any ideas as I've never really got into toolbars and I know there are
a few "gotcha's"?


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 26/06/2006
 




[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Docking Toolbar in Top-Level Form

2006-06-27 Thread Dave Crozier
Problem: 
I'm trying to make a top level form in which a toolbar is dockable. 

So Far:
If I create a form which is set as a "Top-Level" with Desktop=.T. and add a
toolbar in the init() of the form as follows:

With This
.AddProperty("barToolbar")
.barToolbar=NewObject("Organiser_Toolbar","stdControls")
.barToolbar.Visible=.T.

* Bind My Event to the first Toolbar Button
* This binding fires correctly
=BindEvent(Thisform.barToolbar.btnOpen,"Click",This,"btnOpen")
*
Endwith 
*
Return

The toolbar is created but will only dock with the main VFP window and not
the new top-level form I created. So, how do I make the new top level form
the place where the toolbar will dock? I have the feeling I've missed
something really basic here - but I can't think what.

Anyone any ideas as I've never really got into toolbars and I know there are
a few "gotcha's"?


Dave Crozier
"A computer is a stupid machine with the ability to do incredibly smart
things, while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match"  - Bill
Bryson
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 26/06/2006
 




___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.