Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP Toolbars always on different lines

Status
Not open for further replies.

wgcs

Programmer
Mar 31, 2002
2,056
EC
The most irritating thing in VFP6, I think, is that every time I exit and reenter, it seems the toolbars shift around.

They stay horizontally at the same place, but vertically VFP can't tell where they were, so if I had four toolbars open, all on the same line, then as I progress through VFP, they appear (one for the class designer, one for when in a code editor, one for the alignment, etc) eventually taking up for separate lines at the top of the VFP window, which drastically reduces the space I have to work in, not to mention (ok, I did mention) that everything jumps up and down as I open/close code windows, go to properties, etc, as certain toolbars appear and disappear.

Anyone else experience this, or discover a solution (other than closing all the toolbars all the time)?
 
The jumping up and down is by far the worse, wish I had an answer to how to avoid that, but without moving the window at the exact same moment so you never see the repositioning, I don't know how you would. For applications it has been suggested to make a very small non-used toolbar that is always docked to avoid the shifting, but that seems an inadequate hack to me.

Couple that with the fact that VFP just doesn't seem to know how to "stack and pack" toolbars right and I've got to tell you that I went through hell one time trying to make toolbars disappear and reappear correctly (or should I say reappear wihtout taking up more than their fair share of rows) in an application I was recently working on. It just really can't be done without all kinds of coding acrobatics. I mean a resource table can't even keep the system toolbars straight, let alone a bunch of toolbars I add in. So anyways, no answer for you here wgcs but I certainly feel your pain.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Thanks, Slighthaze,

I've been much annoyed by it, but spent little time on it because it's mainly a development annoyince for me, not our users.

I was hoping someone knew a way to programmatically tell the toolbars what line they should be on, rather than just "dock at top" or "dock at left".
 
William,

Anyone else experience this .....

Only about once every ten minutes (on a good day).

or discover a solution

If anyone does, they will get my instant nomination for life membership of the Visual Foxpro Hall of Fame.

Mike


Mike Lewis
Edinburgh, Scotland
 
Ok, I've found a way to partially alleviate this problem:

put this in a routine and run it, and it will ensure that (if no other toolbars are open) the superCls toolbar and the Class Browser toolbar (VFP6) are on the same line:

Code:
  lnTbrLeft = 0
  if type('_obrowser.oparentclassbrowser')='O'
    _obrowser.oparentclassbrowser.UNDOCK
    _obrowser.oparentclassbrowser.Dock(0,lnTbrLeft,32)
    lnTbrLeft = lnTbrLeft+_obrowser.oparentclassbrowser.width+2
  endif
  if file('C:\Source\Tools\SuperCls\SuperCls.App')
    do ('C:\Source\Tools\SuperCls\SuperCls.App')
    if type('GOSUPERCLASSTOOLBAR.DockPosition')='N'
      GOSUPERCLASSTOOLBAR.UNDOCK
      GOSUPERCLASSTOOLBAR.Dock(0,lnTbrLeft,32) && Top
      lnTbrLeft = lnTbrLeft+GOSUPERCLASSTOOLBAR.width + 2
    endif
  endif

The weird thing is that when docking, if you dock them both at x,0 (x,y), then the second one "insert's" above the first one. But if you dock the second one at x,32, (below the lowest toolbar) it seems to merge the lines.... counter-intuitive, but reliable.

Now, If anyone can tell me how to get an object reference to the system toolbars "Form Controls", "Layout", then we'll have this problem solved!
 
Hi

Hope this helps you...
1. First Make the tools you want visible
2. Now quit the VFP and restart..
3. Now arrange all the tool bars, in the way you want.
4. Run the following commands from the command window or run it from a saved PRG

myFuser = SYS(2005)
SET RESOURCE To
USE (myFuser)
REPLACE ALL READONLY WITH .t. FOR "tool" $ LOWER(id)
QUIT

5. Restart.. so long you dont damage your FoxUser, this set will work correctly.

If you want.. now just pull out the toolbar.. but when you start again, they will be back in position.

:)

ramani :)
(Subramanian.G)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top