Hide Group Title in Form by hyperoslo - ios

I do not want to show the Group Title but I cannot seem to find a way to do this. I have tried setting group title to empty string, nil, and not setting its value at all.
Is it possible to do this? If yes, any pointers would be appreciated.

In your style make all the headers transparent. Using UIAppearance:
[[FORMGroupHeaderView appearance] setHeaderBackgroundColor:[UIColor clearColor]];
There's an example that does this. Check Payment Demo.
You can make only only of the headers transparent by sending any invalid HEX value, for example: clearcolor
[
{
"id":"group-id",
"styles":{
"background_color":"clearcolor"
},
"sections":[
{
"id":"section-0",
"fields":[
{
"id":"email",
"title":"Email",
"type":"email",
"input_type": "email",
"size":{
"width":100,
"height":1
}
}
]
}
]
}
]

Related

Change highlight on clickable Text possible?

I have a #Composable Text("Dropbox") whose Modifier also implements a
clickable {
//..
}
But when I tapping on it
, it gets a grey highlight!?
I do not want this grey hightlight. Can I get rid of this?
Here indication is responsible for showing the highlight.
So making indication = null should do the job
.clickable(
onClick = {
//..
},
indication = null,
interactionSource = remember { MutableInteractionSource() }
)

Part colour doesn't pull through from Configured Products

I have an issue that I have created 4 derived Products from a single part, that each part has a different Colour / Material set within it. I have the 4 Products called as PossibleChildren in my main part but when I try and bring in one of the 4 Products which ever is the first colour I pick, is the only colour that will select, so if for example I select RED for my first part, if I then pick the BLUE part it still only places the RED part. I created the 4 Products by importing this text...
"item_id","configuration"
"sub_s2_8t15","{""componentId"":""racksystems_test:sub_fronttile"",""parameters"":
{""tileColour"":""racksystems_test:s2_8t15""}}"
"sub_s2_7t58","{""componentId"":""racksystems_test:sub_fronttile"",""parameters"":
{""tileColour"":""racksystems_test:s2_7t58""}}"
"sub_s2_4t50","{""componentId"":""racksystems_test:sub_fronttile"",""parameters"":
{""tileColour"":""racksystems_test:s2_4t50""}}"
"sub_twinwall","{""componentId"":""racksystems_test:sub_fronttile"",""parameters"":
{""tileColour"":""racksystems_test:twinwall""}}"
And then in the master.json part I call the 4 created Products...
"itemId": "racksystems_test:sub_s2_8t15",
"condition":"((version=='Rack')&&(company=='BetaTest'))"
}, {
"itemId": "racksystems_test:sub_s2_7t58",
"condition":"((version=='Rack')&&(company=='BetaTest'))"
}, {
"itemId": "racksystems_test:sub_s2_4t50",
"condition":"((version=='Rack')&&(company=='BetaTest'))"
}, {
"itemId": "racksystems_test:sub_twinwall",
"condition":"((version=='Rack')&&(company=='BetaTest'))"
},
I have a KEY in the sub_fronttile.json as this..
{
"key": "tileColour",
"type": "Material",
"labels": {
"en": "Tile Colour?"
},
"defaultValue": "",
"valueObjects": [
{
"value": "racksystems_test:red",
"labels": {
"en": "Black"
}
},
........
Then call the colour in my geometry like this...
AddCube(Vector3f{infillWidth-20,materialThickness,infillHeight-20});
SetObjSurface(tileColour);
MoveMatrixBy(Vector3f{20,-offset,40});
So master.json is my main part and sub_fronttile.json contains my products
Is tileColour a global parameter? If yes, then the global value is assigned on dock. If tileCoulour is not a global parameter, this should not happen unless an assignmentOnDock is used.
In order to workaround the assignment in global parameters, it might help to:
have two parameters instead, tileColour_local, tileColour_global where one is global and not visible, other is not global and is visible.
tileColour_global.onValueChange: "if (parameter.userTriggeredChange) { tileColour_local = tileColour_global; }

How can I change specific text color in Google Spreadsheets?

First of all, Sorry for my English. English is not my first language.
I simply want to change specific text color in Google Spreadsheets.
Example
"▶Mike: Hey, How is going on?"
In this sentence, I want to change only "▶Mike:" this part.
I have no idea what's going on in Java and programming language.
But I really need this. please help.
Thank you
If you want to change the color of a cell in Google Sheets, you can use one of the two options:
1. Use Sheets API
For updating the color of the text, you will have to use the spreadsheets.batchUpdate method.
Request
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}:batchUpdate
Body
{
"requests": [{
"repeatCell": {
"cell": {
"userEnteredFormat": {
"textFormat": {
"bold": true,
"italic": true,
"foregroundColor": {
"blue": 1.0,
"green": 0.0,
"red": 0.0
}
}
}
},
"range": {
"sheetId": 0,
"startRowIndex": 0,
"endRowIndex": 1
},
"fields": "userEnteredFormat(textFormat)"
}
}]
}
If you want to use Java, you might benefit from taking a look at this snippet from here and adapt it according to your task.
However, this option does not offer you the possibility of changing only a part of the text from the cell. For this, you should try using Apps Script.
2. Use Apps Script
Since you want to change a particular number of characters from the cell, you can use the below script
function changeColor() {
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getRange("A1:A2");
var redColor = SpreadsheetApp.newTextStyle()
.setForegroundColor("#ff0000")
.build();
var purpleColor = SpreadsheetApp.newTextStyle()
.setForegroundColor("#871f78")
.build();
var richTextA1 = SpreadsheetApp.newRichTextValue()
.setText("▶Mike: Hey, How is going on?")
.setTextStyle(0, 6, redColor)
.setTextStyle(7, 28, purpleColor)
.build();
var richTextA2 = SpreadsheetApp.newRichTextValue()
.setText("red words, purple words")
.setTextStyle(0, 10, redColor)
.setTextStyle(11, 23, purpleColor)
.build();
range.setRichTextValues([
[richTextA1],
[richTextA2]
]);
}
The above script creates two text styles and later applies them depending on the startOffset and the endOffset parameters which essentially represent which characters will have one of the two text styles.
After executing the above script, this is how the cells will look like:
Reference
Sheets API V4 Method: spreadsheets.batchUpdate;
Apps Script Range Class - setRichTextValues(values).

With the Google Slides API is there a ways to know the height of the text in a shape?

I want to have a shape with text where the text fits neatly inside the shape. To do this I need to know how tall the text in a textElement will be inside a given shape, is there a way to do this?
Answer:
You can get the information of the font size of text inside a Shape using presentations.get with a field mask.
More Information:
The structure of a Shape with text is as follows (irrelevant fields omitted):
{
"shapeType": enum (Type),
"text": {
"textElements": [
{
"textRun": {
"style": {
"fontSize": {
"magnitude": 18,
"unit": "PT"
},
}
},
}
],
},
...
}
You can get this with the field mask:
slides/pageElements/shape/text/textElements/textRun/style/fontSize
Example Request:
slides.presentations.get({
"presentationId": "1x1iiFW0TbP3yPXRldYogXLEGT-tYfa79a2X8ZDIq8tU",
"fields": "slides/pageElements/shape/text/textElements/textRun/style/fontSize"
});
Note: The API does not return if the text wraps across multiple lines or not. This isn't retrievable due to the nature of font sizes. If the font you were using is a monospace font, it may however be possible to work this out based on the width of the Shape and the width of the characters contained within it.
References:
Text - Page.TextStyle | Slides API | Google Developers
Working with field masks | Slides API | Google Developers

white spaces - slack (webhook)

It looks like there is no option post a message containing a table on to slack. I am trying to build a table using text formatting. In the below example the text isn't aligned because first row has text ROW1 and second row has text ROW. Is there a way to add a white space after ROW in order to align this text?
{"text" : "ROW1\t\t\t\tCOL1\nROW\t\t\t\tCOL2"}
Generally speaking, you can use Slack's message builder to test the rendering of your messages.
This being said, while I dont think you can simply "push" spaces to the right, you could use the pipe symbol like this :
"text": "ROW1|\t\t\t\tCOL1\nROW |\t\t\t\tCOL2"
Another possibility, with minor changes, is to use attachements with fields like this
"attachments": [
{
"fields": [
{
"title": "Col1",
"value": "text1",
"short": true
},
{
"title": "Col2",
"value": "text2",
"short": true
}
]
}
]

Resources