Switch datatype of property from textstring to textarea im Umbraco Backoffice - properties

I have a property in multiple document types in Umbraco that has the datatype of "textstring". I need to switch the data type of this property to "textarea" in order to allow for more characters and not be limited to 500 characters.
Being new to Umbraco, I am unsure if this can be accomplished in the Backoffice, or whether i need to do it programmatically.
I have full admin permissions to the Backoffice.
Data loss is not an issue, as it is static text that simply need to be replaced.

Yes, this is possible in the back office. Try the following steps:
Open the doc type you want to change
Click on the 'cog' icon of the property you wish to update, which will access the 'Property Settings' window. This will open a side menu.
Click on the 'x' icon to remove the textstring and replace this with
the textarea type.
You shouldn't have any data loss as a textstring can be updated to a textarea. But I would double check after you change the property type

Related

Is there a way to get a dropdown of Fonts?

b is an instance of the button class. Following are two ways to set the Font of the button b. But in both cases, I have typed out the word ‘Calibri’. Is there a way to pull ‘Calibri’ through some property or method so that we don’t have to type it? Ideally I would like to get a dropdown list from where I can choose a font (something similar to choosing colours). Is that possible?
b.Font = New Font("Calibri", 20)
OR
Dim fontF As New FontFamily("Calibri")
b.Font = New Font(fontF, 20)
Also, if the above is not possible, is there a way to find out the complete list of fonts available to be used in the WinForms I am trying to create? PLease note that I am looking for something as following: b.FlatAppearance.BorderColor = Color.Red. Here 'Red' comes as a dropdown after I type Color.Red. Is a similar thing possible while setting fonts for a button?
I understand you would like intellisense to provide a list of font names when typing. Unfortunately this isn't available directly. You can however, open the designer for the form, select a button and open the font editor:
Then select the font you would like, copy the name, cancel the dialog, and paste the name into your code; or set the font directly through the designer properties with this dialog. Whichever fits your scenario.

set the text of an Action Control to a document property

Is there a way to set the text of an Action Control to the value of a document property?
i.e. I have a property FooProp. I want to set the label text of a button to ${FooProp} so that when FooProp gets updated (via script), the button text changes.
Thanks.
I do not think you can set the Display Text of a button to a document property.
You could really easily create an HTML button that does similar functionality but could still have a dynamic title. Simply create a button and set the name of the button to a Spotfire Label equal to that Document Property. Then perhaps use a python script or other script to do work e.g. change page, load data, etc. Depends on your use case.

How to implement advanced custom properties in VB6 usercontrols?

Sorry I don't know how to name it other than "advanced custom properties". If I know, I would search it first.
I am dealing with a legacy code using 3-rd party controls.
In VB6, When you drag that control onto the form, you can see all the properties supported by the control in the "Properties" window. Such as MarginLeft, MarginRight etc. etc.
That's no problem.
In the "Property" window, the top-most property is generally the "(Name)" field, which is the name of the control.
But the 3-rd party control I am using, has another two "fake properties" above "(Name)", which are "(About)" and "(Custom)".
When you click "(About)", there will be a dialog box showing the company info. When you click "(Custom)", there will be another dialog box showing more properties. These dialog boxes are shown in VB6.
In the "(Custom)" dialog box, you can modify normal properties (same as modifying directly in the Property window). You can do more. There are more properties that are not normal properties (at least you cannot find anything in the Property window).
When you save this form, for normal properties, everything are saved into .FRM file. E.g.,
Control1.MarginLeft = 5
Control1.Text = "I am a control"
However, for the "advanced properties" edited in the (Custom) dialog box, they are not saved in .FRM, they are saved in .FRX in binary format.
E.g., in (Custom) dialog box, you can edit a property called "Caption", which includes text of this caption, the font, the weight, the display style, and a lot of similar properties for Caption. In .FRM, it is something like,
Control1.Caption = "frmForm1.frx":013F
All the text and related properties of Caption are saved in binary format in .FRX file.
Note that, there's no Caption property in the normal Property window, you can only edit it in the "(Custom)" dialog box.
My question is as follows,
How to implement such a (Custom) dialog box that can be shown in VB6?
How to let VB6's Property window display (About) and (Custom)?
How to tell VB6 that Caption property shall not be displayed in Property window, but you can use directly in code as Control1.Caption = xxxx.frx:offset?
How to tell VB6 that this Caption property shall be saved in .FRX, and how to tell VB6 the size of the data, so that VB6 can manages the offset automatically?
How to load the data automatically via VB6 so that the correct values can be displayed in (Custom) dialog box?
As far as I know, .frx formats are secrets, there are a lot of ppl digging into various .frx for standard controls such as Binary(images), List, and Text. I am curious how can a 3-rd party control utilizing .frx, shall the 3-rd party control define its own .frx format? Including for example, how many bytes in front for Length (or no length field at all, it's fixed length), how many bytes for style1, how many bytes for style2, etc.
Thanks a lot. If you know what proper name it is for this "advanced properties", just tell me the name and I can search myself.
I tried to search for advanced properties but didn't really get anything I want to know.
The frx files are for binary or other non-basic data types. The frm will store the simple properties. What you need to do is to hook into the UserControl events WriteProperties and ReadProperties. You don't need to know where the backing storage is (frm vs frx)., you just need to access the PropBag to read and write your data.
Google is your friend to find the documentation:
https://msdn.microsoft.com/en-us/library/aa242140(v=vs.60).aspx
Or additional information on the topic:
http://www.vbforums.com/showthread.php?365735-Classic-VB-How-do-the-ReadProperties-and-WriteProperties-work-(PropertyBags)&s=3cfbd675928ad1eb94f68fbfb13ccd88&p=3672781&viewfull=1#post3672781
Good luck!

Hide Input in a custom textbox Visual basic

I am using a custom theme which includes a Textbox, and I want to use this to get a password input.
In order to do do that I want the input to be hidden like a regular password input. In a normal textbox I would use the password char option but this one doesn't have it. Can I make the option myself?
If this custom control class inherits the TextBox class, it should also inherit the password character behavior. Have you tried setting it even though you don't "see" it as an option?
If this class was built from scratch (not inherited fromTextBox), you can manually create the effect of a password character by modifying one of its keyboard events (e.g. KeyPress) or TextChanged, if that exists. Your will need to declare a variable for the password, update it appropriately as the user types, and then change the Text of your custom control to a string of password characters the same length as your variable.
If you still can't get your control working, please post the code for the custom class, what you have tried, and the specific problems you encounter when you try each approach.

How to create link in SharePoint custom text field?

I have created custom text field MyItemURL, I am trying to achieve thru coding if user click on Click Me the link should open, but in my coding entire url is appearing under MyItemURL. Just wanted to display Click Me link, how can i do this?
Here is my code:
string completeURL="MyItemComplete URL generated here";
listitem["MyItemURL"]=" Click Me ";
listitem.update();
In listitem["MyItemURL"]=" Click Me you are assigning the value of a text field, not an HTML fragment. If you want a URL field, then use SPFieldUrl and not SPFieldText.