Forum > Beginners

ExtendedNotebook ImageList index

(1/2) > >>

BIT:
How do I get the index of the image of the active tab?


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- if  ExtendedNotebook1.ActivePage.ImageIndex == 1 then

BIT:
Sorry, I recently wrote a comparison in pascal in c++ = and not the way I did ==  :-[

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if  ExtendedNotebook1.ActivePage.ImageIndex = 1 then  

jamie:
So what is the question now ?

Handoko:

--- Quote from: BIT on September 05, 2021, 10:08:57 am ---Sorry, I recently wrote a comparison in pascal in c++ = and not the way I did ==  :-[

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if  ExtendedNotebook1.ActivePage.ImageIndex = 1 then  
--- End quote ---

Pascal is more human readable than C++.

PascalDragon:

--- Quote from: jamie on September 05, 2021, 06:55:58 pm ---So what is the question now ?

--- End quote ---

The question was why the following does not compile:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if  ExtendedNotebook1.ActivePage.ImageIndex == 1 then
Then BIT gave the answer by themselves, namely that Pascal uses a single equals for comparison instead of two like C and BIT had forgotten that. So there is no question anymore.

Navigation

[0] Message Index

[#] Next page

Go to full version