MapPoint Toolbars in Delphi

micheln
05-10-2007, 08:07 AM
Hi EveryBody

I want to show/hide mappoint toolbars (TOOLBAR_STANDARD, TOOLBAR_NAVIGATION...) from my delphi application (I'm using mappoint through an OLECONTAINER).

Based on the exampe here Using MapPoint In Delphi - MapPoint Articles - MP2K Magazine (http://www.mp2kmag.com/a65--delphi.example.mappoint.html) I tried this:
var
TOOLBAR_STANDARD: OleVariant;
begin
TOOLBAR_STANDARD:=1; (the index of the toolbar)

FMap.Application.Toolbars.get_item[TOOLBAR_STANDARD].Visible := True;

But it doesn't work!! what's wrong? (I compiled my program and launched/executed it without error).

did anybody

doMapPoint
05-15-2007, 04:57 AM
Hi!
Try something like this:


procedure HideMenus()...
var
i: integer;
oVar : OleVariant;
begin
for i := 1 to FMap.Application.Toolbars.Count do begin
oVar := i;
FMap.Application.Toolbars.Item[oVar].Visible := false;
end;
end;

Regards,
Dietmar

 
Web mp2kmag.com
mapforums.com