Page 1 of 1
Add line-break to my button
Posted: Wed Feb 25, 2015 5:54 pm
by Tarseld Entwerp
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.
Add line-break to my button
Posted: Wed Feb 25, 2015 6:23 pm
by Evgene Karachevtsev
Hello!
Could you please clarify, did you try to add custom CSS?
Add line-break to my button
Posted: Wed Feb 25, 2015 6:26 pm
by Tarseld Entwerp
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.
Add line-break to my button
Posted: Wed Feb 25, 2015 8:30 pm
by Evgene Karachevtsev
Tarseld,
Do you try use Appery.io JavaScript API http://devcenter.appery.io/documentat... ?
Add line-break to my button
Posted: Wed Feb 25, 2015 8:58 pm
by Tarseld Entwerp
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.
Add line-break to my button
Posted: Wed Feb 25, 2015 9:35 pm
by Evgene Karachevtsev
Tarseld,
Where do you use this code? Could you please share print screen?
Add line-break to my button
Posted: Thu Feb 26, 2015 1:55 pm
by Tarseld Entwerp
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();
};
Add line-break to my button
Posted: Thu Feb 26, 2015 9:00 pm
by Evgene Karachevtsev
Tarseld ,
Please use Appery instead Apperyio for buttons, you can see example in documentation http://devcenter.appery.io/documentat...