Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving the Toolbar...
Message
From
05/10/2000 09:42:41
 
 
To
05/10/2000 09:28:54
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00425261
Message ID:
00425273
Views:
21
Try to restore width first and than other properties. I think the trick is in order of properties setting.

>I have a toolbar and I am trying to save it's position...
>All works except the case where I float the toolbar and resize it so it goes on more then one row..
>
>i.e.
>instead of
>*********************************************
>
>Looks like
>****************
>****************
>****************
>
>I save and restore the following properties....
>docked,dockposition
>top,left,height,width
>
>Please, What am I missing? I bet I'm missing some property?
>
>Thanks
>
>
>My code is simple and looks like:
>
>**Save pos
>IF USED("prefs")
>	cAlias=ALIAS()
>	
>	cline=""
>
>	**save dock position
>
>	cline=IIF(this.docked,"1","0")
>	cline=cline+";"+alltrim(str(this.dockposition))
>
>	**save screen position
>	cline=cline+";"+alltrim(str(this.top))
>	cline=cline+";"+alltrim(str(this.left))
>	cline=cline+";"+alltrim(str(this.height))
>	cline=cline+";"+alltrim(str(this.width))
>
>	select prefs
>	replace toolbar with cline
>	tableupdate()
>	
>	select (cAlias)
>	
>ENDIF
>
>
>
>**getpos
>**restore screen position
>cline=""
>
>cline=prefs.toolbar
>
>cdocked=SUBSTR(cline,1,AT(';',cline)-1)
>cline=SUBSTR(cline,AT(';',cline)+1)
>
>cdockpos=SUBSTR(cline,1,AT(';',cline)-1)
>cline=SUBSTR(cline,AT(';',cline)+1)
>this.dock(val(cdockpos))
>
>ctoppos=SUBSTR(cline,1,AT(';',cline)-1)
>this.top=val(ctoppos)
>cline=SUBSTR(cline,AT(';',cline)+1)
>
>cleftpos=SUBSTR(cline,1,AT(';',cline)-1)
>this.left=val(cleftpos)
>cline=SUBSTR(cline,AT(';',cline)+1)
>
>cheightpos=SUBSTR(cline,1,AT(';',cline)-1)
>this.height=val(cheightpos)
>cline=SUBSTR(cline,AT(';',cline)+1)
>
>cwidthpos=SUBSTR(cline,1,AT(';',cline)-1)
>this.width=val(cwidthpos)
>cline=SUBSTR(cline,AT(';',cline)+1)
>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform