Forum > Cocoa

About Buttons/ExCtrls and cocoa

(1/2) > >>

bigeno:
Hi,
I need help with exctrls @wp.
I've some problems with porting one of my projects to Mac os on cocoa. For some reasone there is no captions on buttons (same for design mode and productuion).
Can anyone advise ?
---edit

What I observed is when creating a new project the text on the button is only in design mode, after closing the project and reopening the button text is no longer there (design mode).
Looks like something is being removed from the lfm ?

AlexTP:
Provide a simple compilable test project, please.

bigeno:

--- Quote from: AlexTP on April 01, 2022, 09:47:00 pm ---Provide a simple compilable test project, please.

--- End quote ---
the problem is with new/empty project also.
Attached example.

wp:
I see... It looks to me that the mac button is very strict regarding custom painting. The debugger shows me that the painting routine is entered and every command is called - but finally is not executed at all.

However, since I don't work on mac except for some occasional compilation tests and simple bug fixes I am afraid that I cannot do much about it. Maybe a more experienced user can help?

bigeno:

--- Quote from: wp on April 01, 2022, 11:05:22 pm ---I see... It looks to me that the mac button is very strict regarding custom painting. The debugger shows me that the painting routine is entered and every command is called - but finally is not executed at all.

However, since I don't work on mac except for some occasional compilation tests and simple bug fixes I am afraid that I cannot do much about it. Maybe a more experienced user can help?

--- End quote ---
yes, the problem is with caption and colors also (whole painting). For captions I found this will work:

--- 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";}};} ---procedure TForm1.FormCreate(Sender: TObject);begin  TCustomButton(ButtonEx1).Caption:='test';end;

Navigation

[0] Message Index

[#] Next page

Go to full version