Tarseld Entwerp
Posts: 0
Joined: Wed Feb 25, 2015 5:54 pm

Add line-break to my button

How to have a multi-line button in the app? Currently the button gets the overflow omitted with the '...' - however I want it to simply wrap. This is easy enough with changing the css to be white-space: normal - however I want to be able to TELL it where to break. Trying to use jquery does nothing... using .innerHTML(), .text(), etc doesn't work at all. I have also tried adding in
, /r/n to the text itself but that just renders the unicode equivalent.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Add line-break to my button

Hello!

Could you please clarify, did you try to add custom CSS?

Tarseld Entwerp
Posts: 0
Joined: Wed Feb 25, 2015 5:54 pm

Add line-break to my button

Yes - that works just fine (white-space: normal ). But I have a long line of text on my button - lets say "Regulatory Compliance (ELM USE ONLY)" I want to get the (ELM USE ONLY) on a new line. Using CSS only it just splits it depending on available width - I should be able to control where the break happens with jquery any other time, but isn't working with the Appery framework.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Add line-break to my button

Tarseld,

Do you try use Appery.io JavaScript API http://devcenter.appery.io/documentat... ?

Tarseld Entwerp
Posts: 0
Joined: Wed Feb 25, 2015 5:54 pm

Add line-break to my button

Yeah I've tried that - I get errors.

Apperyio('btn_regulatorycontacts').text();
VM185979:2 Uncaught ReferenceError: Apperyio is not defined

^ where btn_regulatorycontacts is the name of the button component in my app.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Add line-break to my button

Tarseld,

Where do you use this code? Could you please share print screen?

Tarseld Entwerp
Posts: 0
Joined: Wed Feb 25, 2015 5:54 pm

Add line-break to my button

I put it in the Load event handler of the page.... here is the rendered code in the app in Testing mode, you'll notice my line gets auto commented out for some reason??!

// On Load
var Start_onLoad = function() {
Start_elementsExtraJS();

Code: Select all

         // if home(Start) hide the Back button; 
         //Apperyio('btn_regulatorycontacts').html('test

this');

Code: Select all

         Start_deviceEvents(); 
         Start_windowEvents(); 
         Start_elementsEvents(); 
     };
Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Add line-break to my button

Tarseld ,

Please use Appery instead Apperyio for buttons, you can see example in documentation http://devcenter.appery.io/documentat...

Return to “Issues”