[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
www.undertowsoftware.com • View topic - SetItem text attributes

SetItem text attributes

A forum made available for users of the MapPro OCX SDK to exchange ideas, ask each other questions, etc.

SetItem text attributes

Postby LarryWilton » Fri Feb 01, 2013 2:12 pm

Is there a way to specify the attributes for the text used by a SetItem object? The default settings make it very hard to read on a busy map. I looked at the manual and didn't find much information about the setitemstring function. Hopefully someone here has some additional detail.
User avatar
LarryWilton
Active User
Active User
 
Posts: 26
Joined: Thu Aug 25, 2011 9:23 am

Re: SetItem text attributes

Postby Joe.Tremont » Fri Feb 01, 2013 5:37 pm

Larry, this came up before. Take a look at this thread on this board.

viewtopic.php?f=6&t=51&start=0&hilit=setitem

The short version of the answer is yes, you can set the font attributed for the SetItem text. See the thread for details.
User avatar
Joe.Tremont
New User
New User
 
Posts: 6
Joined: Thu Apr 05, 2012 11:20 am

Re: SetItem text attributes

Postby LarryWilton » Sat Feb 02, 2013 2:07 pm

Thanks, Joe. I had found the other thread, but although I tried all combinations of the provided line of code, I couldn't get the text attributes to change. I am not sure how to use it and that's why I was asking. I even double-checked their web site to make sure that I had the latest build of MapPro80, and I do. I am probably doing something wrong, so if you or anyone else can shed some light...
User avatar
LarryWilton
Active User
Active User
 
Posts: 26
Joined: Thu Aug 25, 2011 9:23 am

Re: SetItem text attributes

Postby Joe.Tremont » Sat Feb 02, 2013 5:13 pm

Sorry, I hadn't personally used this feature, I had just seen the thread and thought I'd forward it to you :-( You might want to contact undertow directly.
User avatar
Joe.Tremont
New User
New User
 
Posts: 6
Joined: Thu Apr 05, 2012 11:20 am

Re: SetItem text attributes

Postby VictorC » Sat Feb 02, 2013 10:03 pm

Joe, the thread you referenced was for mappro 7.1 release 2 :-) if you notice I mentioned that when I posted my question in that thread. And the suggested solution worked. I have no idea how to do it in MapPro80.
User avatar
VictorC
Active User
Active User
 
Posts: 29
Joined: Sun Jan 24, 2010 2:54 pm

Re: SetItem text attributes

Postby Joe.Tremont » Sun Feb 03, 2013 8:00 pm

Ops, my bad. I should have read it carefully :-(

I wonder if it was in the 7.1 version, why isn't it in the mappro80? Why would they take that feature out?
User avatar
Joe.Tremont
New User
New User
 
Posts: 6
Joined: Thu Apr 05, 2012 11:20 am

Re: SetItem text attributes

Postby UShadow » Sun Feb 03, 2013 10:17 pm

I am not sure you need that in MapPro80. If I interpret the user's manual correctly,

"Though fully implemented, this is an earlier method of handling user items, which was left in the current version of the OCX for compatibility with older applications. There is now a User object interface (See later sections of this documentation), which allows multiple layers, finer control over the objects, etc. User Items set using these older SetItem routines are automatically placed in User Layer #0 and can also be managed through the new User Object interface."

You can manage the text and ALL other attributes of whatever you create with SetItem, by accessing the 0-th user layer. I haven't used it in any of my apps, but it definitely sounds like that's the way you'd do it.
Imagination is greater than detail - Albert Einstein
User avatar
UShadow
Frequent User
Frequent User
 
Posts: 61
Joined: Fri May 28, 2010 11:49 am

Re: SetItem text attributes

Postby LarryWilton » Mon Feb 04, 2013 9:00 am

Ah, thanks. A quick read of that section shows you are right. And, with a couple of lines of code I was able to get the text attributes for my setitems to change.

I really appreciate the help.
User avatar
LarryWilton
Active User
Active User
 
Posts: 26
Joined: Thu Aug 25, 2011 9:23 am

Re: SetItem text attributes

Postby UShadow » Thu Feb 07, 2013 2:21 pm

Larry, if I were you (and I am not), I would cross out the sections about SetItem from the manual and pretend they do not exist and just use the user objects and layers. If you don't, sooner or later you'll forget that hey are managed that way and you'll be posting here :-)
Imagination is greater than detail - Albert Einstein
User avatar
UShadow
Frequent User
Frequent User
 
Posts: 61
Joined: Fri May 28, 2010 11:49 am

Re: SetItem text attributes

Postby George.Tan » Sat Mar 16, 2013 1:41 am

UShadow wrote:Larry, if I were you (and I am not), I would cross out the sections about SetItem from the manual and pretend they do not exist and just use the user objects and layers. If you don't, sooner or later you'll forget that hey are managed that way and you'll be posting here

I like your approach, UShadow. I guess one way of solving the problem is pretending the problem doesn't exist ;-)
User avatar
George.Tan
Active User
Active User
 
Posts: 25
Joined: Sat Mar 31, 2012 11:26 am

Re: SetItem text attributes

Postby UShadow » Thu Mar 21, 2013 9:40 am

George.Tan wrote:I like your approach, UShadow. I guess one way of solving the problem is pretending the problem doesn't exist

What are you talking about? All I said is that I would cross out the "old" SetItem stuff, since the newer layers interface which gives the user more control and granularity. How is that pretending that a problem doesn't exist? What is "the Problem"?
Imagination is greater than detail - Albert Einstein
User avatar
UShadow
Frequent User
Frequent User
 
Posts: 61
Joined: Fri May 28, 2010 11:49 am


Return to MapPro OCX

Who is online

Users browsing this forum: No registered users and 2 guests

cron