Textbox

Q:

I cannot seem to find a way to remove the border of the data section of a textbox. See the white border around the Id data field. I am looking to have this a solid background with no border. Can anyone give me a little guidance. I have attached a screen capture of my attributes. All I see for border setting is under the caption setting and it is set to 0.

Name:  Capture.PNG Views: 61 Size:  47.6 KB

A:

To style an individual Canvas Section textbox:

CSS style: background: blue; color: white; border: blue;

Or to do all sections on a Page, edit the Page ‘CSS Style’ file:

Code:
lianja_ui_section * {
background-color:blue;
color:white;
}

lianja_ui_textbox {
background: blue;
color: white;
border: blue;
}

(Or for all sections in the App, put it in the App ‘App CSS style’ file.)


Q:

Can I databind a textbox and/or comboBox to a table in a canvas section?
Every time I click away from the item, the “Data source” of the items reverts to blank
Name:  lj_databind.jpg Views: 29 Size:  52.5 KB
1) I try to put a textbox that shows a value from the first record of the table. I tried putting myTable.nThisField into the “Data source” of the item to no avail.
2) I also tried a dropdown combobox populated from another table, also failed. So I set “choices” property. Still it fails to populate Name:  lj_databind2.jpg Views: 29 Size:  65.9 KB

A:

Check the actionbar at the bottom of the Attributes grid. When core attributes are edited, save and cancel (tick/cross) icons are displayed to confirm or abandon the change.


Q:

Possible to init a textbox with a default value eg. field1.value=123
If yes, where should i put this code? I tried putting in section->init() / load()/ ready() without success.

A:

Put it in the Page ready().

A2:

Specifying a default value in Page.Init works only if the input text is not bind to a table field.


“value” and “text” are synonymous.


Q:

A canvas section with 1 combobox “cbo1” and 3 textbox “txt1”, “txt2”, “txt3”.
cbo1, txt1, txt2 are bind to a table field source.

tx3.value is computed depending on cbo1, txt1, and txt2 values.

How do i achieve that during record navigation?

A:

put this calculation in section’s DataChanged (After Data Changed) delegate
The “Data Changed” delegate is called whenever you navigate between records.