Answer the question
In order to leave comments, you need to log in
Is it possible to integrate additional programming languages into Lazarus?
I learned about such a wonderful IDE as Lazarus, and I just have a project where a graphical interface will come in handy. One problem, I'm studying Lisp and don't want to be distracted by other languages, otherwise you won't learn anything at all. Is it possible to integrate Lisp into Lazarus without rewriting it from head to toe? If not, is it possible to somehow call Lisp functions from Pascal?
Answer the question
In order to leave comments, you need to log in
Depends on the context. For modern browsers, a solution with CSS3 'vh' units will do;
For older browsers, you will have to use javascript and keep track of the screen height.
caniuse.com/#feat=viewport-units - the first option, height: 100vh corresponds to the height of the browser window.
https://api.jquery.com/height/ - the second option, $(window).height will return the height of the browser window.
For the first option:
#hei {
height: 100vh; /* 100vh - 100% от высоты viewport(окна браузера) */
}
function setHeiHeight() {
$('#hei').css({
height: $(window).height() + 'px'
});
}
setHeiHeight(); // устанавливаем высоту окна при первой загрузке страницы
$(window).resize( setHeiHeight ); // обновляем при изменении размеров окна
Depends on the location of your div in the DOM. If it is a direct descendant of the body, then it is enough just to set its height to 100% and at the same time do not forget to specify the height for html and body also at 100%. In general, there are a lot of solutions, but it all depends on the context, so you'd better post a code example to get an adequate answer.
There is a property in CSS3 that allows you to be very flexible.
Naturally, it does not work in older browsers, and it is also not supported in Opera 12.
But if we are talking about 100%, then the essence of the solution is to build the parent chain of DOM containers with a height of 100%
function setheight(){
var clientHeight = document.body.clientHeight;
$('.hei').height(clientHeight);
}
$(document).ready(function() {
function setheight();
});
$(window).resize(function(){
function setheight();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question