FG Spreadshirt Swag
  1. #1

    Prepopulating a stringcontrol

    Hey all, have a feeling the answer to this is somewhere but alas I can't find it.

    What I want to do is set up a stringcontrol on a character sheet that comes filled in with a default value, so that rather than being blank when the character is created it is set to a certain value (say "This is a string" for example). I know how to do this with a numbercontrol but just can't figure it out with a string. Anyone clue me in?

  2. #2
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    Code:
    <stringcontrol>
    	<bounds rect="150,74,10,10" />
    	<static value="value here" />
    </stringcontrol>

    Should do it. Best of luck
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  3. #3
    Quote Originally Posted by Azrael Nightstar
    What I want to do is set up a stringcontrol on a character sheet that comes filled in with a default value, so that rather than being blank when the character is created it is set to a certain value (say "This is a string" for example). I know how to do this with a numbercontrol but just can't figure it out with a string. Anyone clue me in?
    Assuming that you want to be able to change the string , what you are asking is not possible. Prefilling a string as <static value="text here" /> makes it static, i.e. unmodifiable.

  4. #4
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    Well that or take the value from a pre-defined data-set?
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  5. #5
    couldn't you just set up an empty value line?

    e.g.

    <stringcontrol name="name">
    <bounds rect="45,10,-15,20" />
    <empty value="&laquo; New Item &raquo;" />
    </stringcontrol>

    Regards
    Uni

  6. #6
    That's perfect Unimatrix, thanks Take that Ged!

  7. #7
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    This si the sign of GOOD software, not even the developers knows what it's true limits are anymore.
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  8. #8

    Join Date
    Jun 2006
    Location
    San Diego, CA
    Posts
    45
    It's also a sign that there's a lack of internal documentation...

  9. #9
    This will sound silly but I can't figure out exactly what the stringcontrol does. For example this is the class that makes the list on the right side of the reference window.

    Code:
    <windowclass name="classsmall">
    	<datasource name="class" />
    	<defaultsize width="250" height="27" />
    	<sheetdata>
    		<windowopencontrol name="open">
    			<icon normal="button_openwindow2" pressed="button_openwindow2down" />
    			<bounds rect="0,0,24,24" />
    			<class name="class" />
    			<description field="name" />
    		</windowopencontrol>
    		<stringcontrol name="name">
    			<bounds rect="30,2,150,20" />
    			<link handler="open" underlineoffset="-2" />
    			</stringcontrol>
    		</sheetdata>
    	</windowclass>
    This creates a list of buttons that open other windows. Is the word next to the button the string control and the button from the windowopencontrol? Also what does the underlineoffset do, place the line 2 pixels below the word?

    If the stringcontrol is the control that makes the list then how do the windowopencontrol and the stringcontrol line up since they both are in a list?

  10. #10
    The classsmall windowclass represents ONE line.

    The <windowlist class="classsmall"> in the 'referenceroot' windowclass is the tag that turns it into a list.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in