With WxWidgets, is the wxTextCtrl one-size-fits-all? - wxwidgets

When working with guis of different kinds, I am used to the distinction of text field or text entry box versus text box. That is there is one type of object for the multi-line word processor style text box and another type of object for a single line, quite often non-scrollable text field / text entry box. Does wxTextCtrl serve both purposes? I know it does the text box but is it also the correct choice for the text field/text entry box?
EDIT
There are actually 2 types of text boxes for multi-line entry as pointed out in the answers. What really interests me are widgets specific for single line entry versus widgets specific for multi-line entry.

wxTextCtrl serves for both single and multiline entry. It is quite powerful but not exactly 'word processor style'. Closer to that would be wxRichTextCtrl.
wxComboBox uses wxTextEntry ( as does wxTextCtrl in single-line mode ). Although wxTextEntry is not offered as a control itself - it does not inherit from wxControl - if you like it so much you might be able to build something using it. But it seems like a lot of trouble for benefits that I do not see.

wxTextCtrl is a single line text control (what is called "entry" in other frameworks) by default. If you specify wxTE_MULTILINE style when creating it (this style can't be changed later), it becomes -- surprise -- a multi-line control, i.e. what is called "area" in other places.

Related

Does a DCL Fonts Reference Exist?

I'm was going reviewing a few autolisp and dcl tutorials (afralisp & autolisp-exchange) to brush up on the dcl code. To cut to the question, I see that the text can be underlined by the mnemonic in afralisp and the & in autolisp-exchange.
Is there a better way to underline a string of characters?
Can a string be made bold, italicized, or strike-though with this
file type?
If the above is true, is there a reference webpage that has a list of fonts that can be used with the dcl file type?
This webpage may contain the solution, but I haven't seen how: AutoDesk.com
In short, you cannot arbitrarily change the GUI font face or style using standard DCL.
The ability to underline text is purely an exploit of the mnemonic property which allows DCL controls to be manipulated using keys on the keyboard which correspond to the underlined letters as opposed to using the mouse to click such controls.
Whilst DCL text has the is_bold property, this has never worked (and likely never will). One alternative is to feign bold text using the set_tile function in conjunction with an image tile; or you can use the fixed_width_font property, but, as the name implies, this will change the text to use a fixed width font (the exact font cannot be changed).
One other possibility is to display text using the vector_image function applied to an image tile, as I demonstrate in the 'About' dialog for my Incremental Numbering Suite application.

Determine the Text that can Display in Multiline PDTextField

Is there a way to determine the text that will actually display in a PDTextField when the PDF prints? If I call setValue and then getValue, it returns all of the text even though it will not all display.
I am trying to fill out a form with a limited size multiline text field that has the notation to attach another page for more details. I would like to limit the text to that which will display and generate the added detail page.
Thanks for indulging a PDFbox newbie.
There is no direct way to find that out as the details of the text layout such as line breaks, padding, line spacing are hidden inside the non public class PlainTextFormatter inside the org.apache.pdfbox.pdmodel.interactive.formpackage. So you'd need to replicate that code.
PDFBox tries to resemble the calculations done by Adobe Acrobat and Adobe Reader but the details of such calculations are not part of the PDF specification. So doing your calculation is only valid for a similar layout model. Other form filling applications might have a slightly different layout model and as a result your results will not apply to these.
In addition to that Acrobat (and PDFBox) place text although it might be partially clipped. Look at the results of the AlignmentTest.javaunit test to see what I mean. So one might have a different expectation to what 'fitting' really means.
As I've thought about passing the information about which text fitted back to the calling application anyway I've opened an enhancement request https://issues.apache.org/jira/browse/PDFBOX-3413 for that.

Possible to control PDF layout with iText?

I'm writing some logic to build a large single PDF file that our users can print at their convenience. I'm using Java's iText library (through Clojure's clj-pdf).
I'm trying to have the PDF show the same exact template form on every single page, however I can't seem to find any documentation or indication that one can have PDF content "fit to a page".
The text in these forms varies a little bit, so there's a chance it might require more of fewer text lines per page. This means that the content has a chance of spilling over to the next page, or being too short, making the next page creep up into the previous one, breaking the requirement of "one form per page" for the rest of the document.
I'm trying to figure out if my option is pretty much only to manually check the length of the text on each page and potentially crop it by hand if I goes over n lines, or if the PDF format somehow supports a smart way of having paragraphs+tables+headings all fit in one page. Some UI systems allow you to control how spill-over is handled, anywhere from cropping to resizing the font, so I'm curious if PDF supports anything of that sort.
Edit: ended up going with pagebreaks for simplicity, wasn't aware of that option when I wrote this question.
If you want to take control over the space taken by text, for instance to fit it on a single page, the way to go would be to create a ColumnText object and to add the content in simulation mode. If the text fits the page, add it for real. If it doesn't, use a smaller font size. This is demonstrated in the MovieAds example where snippets of text are fitted into AcroForm fields.

purpose of vertical bar in programming IDEs/Editors

In this example. I'm using Phpstorm Code Editor and I wonder the purpose of this Vertical Bar
This is a visual limiter of the line length.
Usually the code convention in programming languages or in particular project requires to have the line of code to be limited by length.
For example Python's PEP 8 coding convention requires it to be limited to 79 characters.
So basically this limiter in your text editor or IDE is just made for convenience to help you to control the maximum line length in your code. Usually you can set-up the maximum code line length in the settings.
From: http://www.jetbrains.com/phpstorm/webhelp/editor-appearance.html
Show right margin (configured in Code Style options) Select this check box to have a thin vertical line at the right margin of the editor displayed. Refer to the description of the General page of the Code Style settings.
From: http://www.jetbrains.com/phpstorm/webhelp/editor-appearance.html
Right Margin (columns) In this text box, specify the number of columns to be used to display pages in the editor.
Wrap when typing reaches right margin Select this check box to ensure that edited text always fits in the specified right margin.
So you can probably disable it if you want...

Dynamic - Expanding Text Box in Adobe Acrobat X Pro?

I have some forms that I need to add expanding text boxes to.
I already have Multi-Line selected. And yes the scroll-bar appears when field is full and you keep entering text. However, when you go to print, it doesn't print out the full text.
I know in Adobe LiveCycle you can make dynamic forms, that bump onto the next page. I have done this, but you lose so much functionality in LiveCycle. To be dynamic you lose the ability to position objects without using tables and therefore doing designs and graphics are not as easy.
Has anyone found a way to do this in Adobe Acrobat X Pro?
At this point, I think it would be easier just to convince people that a web form is much easier to update and style any way you want with print CSS stylesheet.
Thanks for any suggestions.
To be dynamic you lose the ability to position objects without using tables and therefore doing designs and graphics are not as easy.
That is not true. A form being dynamic or not has nothing to do with having flowed or positioned content. A static form renders once on the server, a dynamic form can be re-rendered on the client and thus is able to reflect layout changes like hiding objects or altering heights of objects (more info).
With either form type you can have both positioned and flowed content. The trick is to divide your form into subforms according to the structure of the data you want to display (tutorial).
To let the text field grow automatically with the amount of text, enclose it in a subform with flowed content, allow multiple lines and enable "expand to fit" (or "auto-fit).