Roblox TextBox display value is not the same as the value in the editor - lua

I have a TextBox in a ScreenGui inside StarterGui. I've created a script that sets a variable named cash to 10. It should then procede to change the value of TextBox to 10; it does. Then, 1 second later, it increases cash by 10, and changes the value of TextBox to 20, but didn't display it. I then looked in the editor, and sure enough, it said 20 as the value.
Why was it displaying the original value, and not the actual value?

I believe you've selected the wrong TextBox. It is selected in your properties menu, but it is not highlighted on the screen. Maybe you're looking at the TextBox in the StarterGui? So that could be the problem with your script.

Related

MS Access -- Yes/No statement

I want to create a Yes/No row in a table, the row would be called 'prepayment'. So, if there is one, and you check 'Yes' in the form, I want some textbox to appear -- so you could type in the sum of prepayment. Is there some way to do it the way that textbox to type in the sum wouldn't be visible in the form unless you check 'Yes'?
I didn't really try anything yet. Just have no idea how to do it...
Solomon,
Set the Visible property on the Textbox to No.
Create an On_Click event for the Checkbox.
The code for the On_Click event should change the Textbox Visible property to Yes. You might also want to check the current setting of the Textbox Visible property so you can hide it if they uncheck the Checkbox.

Delphi Checkbox grayed and checked

I have been working with Delphi for about a month now so I'm relatively new.
I have a checkbox that greys out when I change the data field just want to know why that might be?
Your TDBCheckBox is grayed because the value of the datafield assigned to it does not match ValueChecked or ValueUnchecked properties.From documentation
If the contents of the field matches no string in either ValueChecked
or ValueUnchecked, the check box appears gray.

tooltip for checkboxGroup or radioGroup in repeat control

I have a repeat control bound to a (multi column) viewScope array.
The idea is that the chekboxGroup value will come from the first column and that the tooltip will come from the second column from the array.
The first thing (checkbox value) is not the problem. (see code)
The second thing is:
How can I assign the correct tooltip to the correct checkbox ?
<xp:repeat id="repeat4" rows="100" value="#{viewScope.choices}"
indexVar="rownumber" var="row" first="0">
<xp:checkBoxGroup id="checkBoxGroup2" layout="lineDirection">
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:return viewScope.choices[rownumber].get(0)}]]></xp:this.value>
</xp:selectItems>
</xp:checkBoxGroup>
<xe:tooltip id="tooltip1" for="checkBoxGroup2">
<xe:this.label><![CDATA[#{javascript:return viewScope.choices[rownumber].get(1)}]]></xe:this.label>
</xe:tooltip>
</xp:repeat>
EDIT
It seems that the tooltips work but are displayed off screen.
How do I manage to display them at the correct spot ?
Add position="before" or position="above" or position="below" to your tooltip control.
<xe:tooltip id="tooltip1" for="checkBoxGroup2" position="before">
By default it is "after" and this is outside the visible area in your example.

cxGrid expand row height to new line with enter

This is a little hard to explain so please bear with me. When I am editing a text field in one of the columns I would like to,when I hit enter, go to new line under the edited text so the grid basically expands.
Options-View-CellAutoHeight set to true expands the cell but editing is terrible.Cant
see a thing where the first line is,where it ends,etc...
Here is the grid:
I can not go after the last letter 'a' with my mouse cursor and hit enter so another line gets added. Which settings regulate this ? I know it can be done since I had a grid once and could do this.
EDIT: This requires no code just applied settings.
Just tested it with DevExpress VCL 13.2 and it can be easily done without coding (if I understood what you want to achieve).
Basically, you need to set following properties:
Assign a Memo to the Properties of your column and make sure its WantReturns property is set to true.
In your TableView set the OptionsView.CellAutoHeight property to true.
Also in your TableView, set the OptionsBehavior.EditAutoHeight to either eahEditor (editor is sized vertically to fit the content) or eahRow (the entire row is sized when editing) as needed.

Write constraint to validate a field based on the value entered in another field in Orbeon Form Builder

I want to validate the size of the phone number field based on the selection made in the Phone Type field. Cell numbers should be 10 in size, Home and work numbers should be 11 in size. How would I write the constraint expression in Orbeon Form Builder. I tried using if in the constraint field, but was unsuccessful.
Thank you for your help!
Let's say you have two controls: a phone type and a phone number.
Create the phone type control, for instance as a drop-down or radio buttons. Give it a name, clicking on the cogwheel to open Edit Control Details. Say that name is phone-type. You will will refer later to the value selected by users as $phone-type.
Edit the items and keep in mind the value you assign to each item. The value is what you will use later, while the label is what is displayed to end users in the form. Say the values are work and mobile.
Create a single line control (text field), click on the red exclamation mark to open the Edit Validation Properties dialog, and there, under Constraint, write:
string-length(.) = (if ($phone-type = 'work') then 11 else 10)

Resources