I have created a textarea in my python project using Pythoncard
The problem is, I don't know how to call it in my project to change the text. It's called myTextArea.
Thanks
see the TextArea doc here: http://pythoncard.sourceforge.net/framework/components/TextArea.html
I think the methods you want to use are appendText and writeText
From within the PythonCard-generated GUI class:
self.components.myTextArea.clear() ## clear the TextArea
self.components.myTextArea.text = "initial text" ## directly set text
self.components.myTextArea.appendText("\nhello world") ## append text
self.components.myTextArea.writeText("\nhello world2") ## append text
Related
I wish to ask you if it is possible to define dynamically the label of a 'text field' control when a form is loaded. Actually, I need to pass the label value through a URL parameter and use this value to define the label. Is that possible? I've made a research for a similar case but I cannot find a way to get the value of a url parameter and set it as a control's label before the form is displayed in the user.
Regards,
George
In the Control Settings for your control, in the Label tab, do something as follows. Here I'm getting the value of the foo request parameter, but you'll most likely want to use a more meaningful name.
That's it, really: with this, when you load your form, say with the URL http://localhost:8080/orbeon/fr/a/a/new?foo=bar, the control will get "bar" as its label. Also see Template syntax.
I spent a few hours searching Google to see if anyone had shared their articles, but came up empty-handed.
If it's possible, I want to know how to enable/disable the PasswordChar in Delphi XE8's TMemo to hide user input like in TEdit. ? Maybe via a checkbox!
So when the checkbox is checked then all text turned to asterisks, and if the checkbox is unchecked, all text back to normal..
The VCL memo control is a loose wrapper around the Win32 multiline edit. The password character functionality of the edit control is only available for single line edits.
The behaviour is controlled by the ES_PASSWORD style for which the documentation says:
Displays an asterisk (*) for each character typed into the edit control. This style is valid only for single-line edit controls.
The FMX memo control offers no password character functionality for the multiline memo control.
Presumably these frameworks don't offer what you want because passwords are entered in single line edit controls. Developers tend not to provide functionality that has no clear case for being used.
Your options:
Use a single line TEdit.
Write your own multiline memo that supports your desired functionality.
Find a third party multiline memo that supports your desired functionality.
Now, since your question is so general I have assumed that you want full support for single line password character. That is, the user enters text and it appears masked.
But maybe you actually don't need editability. In that case it is simple enough. Do the following:
Load or add the true text into a separate TStringList.
When you want to display the true text assign the string list to the memo.
When you want to hide the content, process the true text into whatever you want to display, and display that.
Make the memo control read only.
if cBoxPassword.checked=false then
edtpassword.PasswordChar:='*';
if cBoxPassword.checked=true then
edtPassword.PasswordChar:=#0;
I am able to generate & download pdf using export plugin in grails. Now, I want to pass parameters to export plugin tag,
<export:formats formats="['excel', 'pdf']" params ="parameters to be passed here"/>
I have one text box & now I want to pass that text box value into that export tag.
Simply, I want to write some text in the text box & capture entered text box value in my export tag.
Can somebody please tell me how to do that? I am new in grails. Thank you.
I have question:
My xpages contain a field that contain creator of document.
The issue is:
When ReadOnly field is Enabled, the agent can't get value of the field from context.
I want user can't change the value of the field
How to solve it?
Note: there a button that will call the agent to process the context
Thank you for your help
Why not to use the disable property of the inputText? And with a little help of CSS the result might be just fine:
<xp:inputText id="inputText1"
style="background-color:none;border:none;background: transparent"
disabled="true">
....
</xp:inputText>
Or you can compute the disable property:
<xp:this.disabled><![CDATA[#{javascript:if (currentDocument.isEditable())
return true;}]]></xp:this.disabled>
Hint: I recommend to create a .css file and write there all the properties. Then just import the file to the respective xpage/custom control and specify the class in the Style property of the field.
First of all: it isn't very clear what you want to do. You have a field with the creator of a document and you speak of an agent. A few pointers:
Never try to process UI elements. Always go after the data model, the bound data.
Displaying a username doesn't write it back anywhere, you need to take a different action. Add to the "post new document" event something like:
var creator = document1.replaceItemValue("Creator",#UserName);
creator.setAuthors(true);
(above is off my head, might contain typos). Then the value is in the document, you can use it in a computed field and hand it over to an agent (which I wouldn't do, convert your agent code to Java and clean it up while you are on it).
Do you mean something like this?
<xp:inputText id="inputText1" defaultValue="test">
<xp:this.attrs>
<xp:attr name="readonly" value="true"></xp:attr>
</xp:this.attrs>
</xp:inputText>
I have an agent that takes a copy of a template document and puts in values from a text file.
I am running into a problem when adding a hyperlink to a field programmatically, If I just add the text (e.g. http://www.google.com) there is no hyperlink just plain text. If I add the text manually, by editing the document just adding the address works fine and is clickable.
I have tried creating a rich text object then adding that to the field but that doesn't work either :(
Set rtItem = New NotesRichTextItem( doc, "link" )
Call rtitem.AddNewLine( 1 )
Call rtItem.AppendText ("http://www.google.com")
doc.AppendItemValue "Details", rtItem
To be clear, I'm looking for a way to append a clickable hyperlink to a field using lotusscript. Any help would be greatly appreciated.
EDIT:
Upon further inspection if I generate a document with a link in the text field and save it (programmatically using doc.save) it saves as plain text, as soon as I then go into this document and do a manual save the plain text turns into a link just fine. Could something be wrong with how I am saving?
If (Not doc.save(True,False,True)) Then
Msgbox("Document could not save")
End If
It does work the way you tried in your code with just "AppendText". But, the link works only if the document is in read mode and client property "Make Internet URL ... into Hotspots" is set.
UPDATE:
AppendItemValue doesn't work for RichTextItems.
Append the link direct to your field "Details" or if it doesn't exist then create it. Your code should look like this:
Dim rtItem As NotesRichTextItem
If doc.Hasitem("Details") Then
Set rtitem = doc.Getfirstitem("Details")
Else
Set rtitem = doc.Createrichtextitem("Details")
End if
Call rtitem.AddNewLine( 1 )
Call rtItem.AppendText ("http://www.google.com")