View Full Version : Question regarding template "ft_content_columnh_full"
Mephisto
August 20th, 2025, 14:43
Hi there,
based on the template name "ft_content_columnh_full", I would expect the template to auto-hide on readonly if empty. However, it doesn't do this. Is this a bug or by design?
Trenloe
August 20th, 2025, 16:26
What code are you using in the window onStateChanged event?
Looking at an example in CoreRPG - "notes" in campaign\record_item.xml, the onStateChanged event in item_main.lua uses this code:
WindowManager.callSafeControlsSetLockMode(self, { "notes", "description", }, bReadOnly);
WindowManager.callSafeControlsSetVisible(self, { "notes", "description", }, bID);
Moon Wizard
August 20th, 2025, 18:17
As @Trenloe pointed out, the setLockMode on the control must be called from the window script when it receives the onLockModeChanged event.
Otherwise, that template looks like it is set up correctly.
If still having an issue, we would need to see the window script and definition of that control within the windowclass.
Regards,
JPG
Mephisto
August 20th, 2025, 20:07
Thank you both! User too stupid error. This resolved it:
function onLockModeChanged()
local nodeRecord = getDatabaseNode();
local bReadOnly = WindowManager.getReadOnlyState(nodeRecord);
WindowManager.callSafeControlsSetLockMode(self, { "stat_notes", }, bReadOnly);
end
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.