I have a property grid within which is currently a displayfield. I have been asked to make this particular field a multi-line field, so that text is wrapped around and carriage returns in the text are shown correctly.
I looked at a textareafield, but this seems to ignore readOnly: true, editable: false and methods of avoiding edits such as beforeedit: function(){return false;}.
I also tried to try and apply multiple line inserts (converting them to </br>) as part of the renderer within the displayfield , but this does not seem to work either.
What is the most efficient method of achieving this? Am I missing something simple in the API that provides the functionality I require?
I'd like to think this can be abstracted to a general case quite easily, but can provide code if deemed necessary.
EDIT:
To try and clarify my problem, I need a field that:
Cannot be edited by the user; no text bar and typing in the field.
Allows for multiple lines of text to be shown, by both word-wrap and
by carriage returns/new lines
Think of a textareafield (expands to show all its contents) crossed with a displayfield (no editing capability).
You might be looking for a textareafield with disabled set to true..
You can have new lines on the text with \n.
Hope that helps ! :)
Related
I've got several different types of charts in my application, and the TextAnnotations edit perfectly on 2/3 of them, but I've got one type of chart that is defying me.
While I can add, and move the annotations on this chart just like the others, and I get the IBeam cursor as if its about to let me edit, select text, it merely never does.
Any ideas on things I could look at would be greatly appreciated.
According to the SciChart Documentation for TextAnnotation:
The TextAnnotation type draws a TextBlock with optional background at X1,Y1. The text is editable when the use clicks on the TextBlock and TextAnnotation.IsEditable = true.
If your text annotations are declared in the same way, do not have differing templates or styles, and all have IsEditable true, then it sounds like they should be editable and you have discovered a bug.
Try the latest build from SciChart's NuGet feed. If the bug still occurs I would suggest sending code and steps to reproduce to their Tech Support.
We are building an application which is using the grid to show records. Now we cam across with a requirement to show 2 fields(1combo and 1 textfield) in a single cell editor. we have tried with 2columns with 2editors but the problem here is we need to enable the both cell editors at the same time.
this link http://blog.platinastudio.com/?attachment_id=2485 can be helpful for understanding the requirement clearly.
any help will be greatly appreciated!!
Thanks
Sanjeeva
If you are able to use two columns and 2 editors, then you should just need to do the wiring manually, and it should work okay.
For each editor, listen for the beforeedit event
In the handler, call startEdit on the other editor
You'll need to configure the editors to not reset on blur probably, and there may be additional configuration needed to get the interactions right, but in theory it should work out.
If you are trying to use two editors in the same cell, then you can mention xtype:'container' in the editor configuration of the column and add your fields in this container.
An example of this is given here
I want to do a simple thing but I don't have any idea. I made a button in GUI status it has a functon key and it works. Now the real thing. I want that for every checkbox I mark, when I press the button to call a new screen to show me only the entries that were checked.
The checkbox is added in the itable, but I think it doesn't matter that much. How can I tell the button which checkboxes on screen where checked?
The answer is pretty much what Bernard said, though it is lacking some detail.
You will need to know how many lines you wrote, this is stored in SY-LINNO, note that you need to also take into account how many pages you outputted which is stored in SY-PAGNO and how many lines are on a page which is stored in SY-LINCT.
You could get that info, which is probably a better approach, with 'DESCRIBE LIST'.
Then for each line with the command 'READ LINE' you can find the value of the checkbox.
READ LINE line OF PAGE page [result].
From there things should be a piece of cake.
For the checked records the checkbox field is 'X', while for the unchecked records the checkbox field is space (' '). So you need to loop over the records on the screen, then only display the ones where the checkbox is equal 'X'.
Besides all the answers you already got, you don't want to dig into interactive list programming any deeper (unless you have to do this for a programming exercise). Take a look at the ALV Object Model Documentation and the SALV_DEMO_* example programs.
I want to do this in xaml.
I hope somebody can help.
Thanks!
the only option I can think of is to put the text with TextTrimming set to WordEllipsis, and have a second textblock. then in onloaded check the text property to see if the last characters are ...
but i'm not even sure getting the text will retrieve text after the ellipsis is added.
one option I thought would be to create a custom ellipsis, or to to use some ontrimmed event, but they are not available.
I would like to indicate to the user that a particular textbox or combobox is mandatory. What is a neat way to do this?
Currently, I have a gradient red border around the textbox when the text is null or empty, but it seems a bit much when you show a form and a number of the fields are red. I'm looking for something that is clear, but is not so overwhelming to the user. Something subtle.
I would prefer to make the textbox indicate that the field is mandatory rather than say make the label bold or have an asterisk. What are my options or any ideas you might have.
A recent usability study suggests taking the opposite approach and indicating which fields are optional rather than required. Furthermore, try to ask for only what you really need in order to reduce the number of optional fields.
The reason is that users tend to assume all fields are required anyway. They may not understand or pay attention to the asterisk, whereas they readily understand clearly labeled optional fields.
Link to the study (see Guideline 5):
https://www.cxpartners.co.uk/our-thinking/web_forms_design_guidelines_an_eyetracking_study/
Just put a * in front on the mandatory fields. It's simple, yet effective. I think most people will know what this means. Also, when they try to submit and it fails, because some mandatory field was not filled in correctly, then you let the user know which field they need to change (by using those red borders, for instance). I think this is what most people are accustomed to.
Edit: I saw that you didn't want to use an asterisk by the way. I still think this is the best option, simply because I think most people will recognize it right away and know what to do :)
I do it this way. Mark the left-border of the element with 2px Red color.
you can also change background color of textbox..
It depends on your design, of course, but I prefer something simpler like the labels of the input being bold. The red outline, while clear, does have an "error" connotation associated with it, which might be misleading to the user. Bolding the labels is subtle, but easy to understand without being an eyesore.
I like the jquery 'example' plugin for text input fields. A subtle grey inlay for instructions or sample input.
See demo page here for an, ahem, example. http://mucur.name/system/jquery_example/
Depending on how many fields you have, it might be too cluttered, but light-colored, italicized text like:
first name (required)
last name (required)
might work for your app.
HTH