-
July 14th, 2019, 23:57 #1
setEditMode and isEditMode in FormattedTextControl
By looking at the API Documentation the FormattedTextControl have two methods setEditMode and isEditMode. https://www.fantasygrounds.com/refdo...extcontrol.xcp
I'm creating a control from code. I'm using a template which is a FormattedTextControl and I'm trying to call these two methods but none of those are valid functions.
I'm not sure if I'm doing all the things correctly.
Template
Code:<template name="wizzy_trait_description_left_column"> <formattedtextcontrol> <anchored height="60"> <top parent="columnanchor" anchor="bottom" relation="relative" offset="20" /> <left offset="50"/> <right anchor="center" offset="-15"/> </anchored> <invisible/> </formattedtextcontrol> </template>
Code:descriptionControl = createControl("wizzy_trait_description_left_column", k.."_trait_description"); descriptionControl.setEditMode(false);
-
July 15th, 2019, 00:04 #2
window.createcontrol doesn't return a control. Access the created control with the control name created from k.."_trait_description"
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
July 15th, 2019, 00:11 #3
I'm not sure that's true unless I missing some aspect of what's going on here. I've done this and it works.
Code:local controlInit = createControl("initiative_weapon_ct", sControlInit); controlInit.setValue(aWeapon.nSpeedFactor); controlInit.setReadOnly(true); controlInit.setTooltipText("INITIATIVE");
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
July 15th, 2019, 00:13 #4---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
July 15th, 2019, 00:17 #5
-
July 15th, 2019, 00:20 #6
-
July 15th, 2019, 00:20 #7
So, let's clarify what the issue is. You say "none of these are valid functions" - what feedback do you get? Do you get an error message?
Can you right-click in the formattedtext control and see if the format menu is available or not?Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
July 15th, 2019, 00:22 #8
-
July 15th, 2019, 00:23 #9Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
July 15th, 2019, 00:24 #10---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks