Recent

Author Topic: Changing Colors in TNotebook and TPageControls  (Read 8044 times)

Hydexon

  • Full Member
  • ***
  • Posts: 166
Changing Colors in TNotebook and TPageControls
« on: October 29, 2010, 08:39:51 pm »
 I am developing software with my new user interface called KhromaUI. But a problem stops the development of my software this the default color of TNotebook and TPageControl,is default color depending OS colors. in Windows is White (Windows XP with Luna Theme), and in Ubuntu TNotebook and TPageControl is with color depending the background color of the form and is unable for change. How I can fix this?.

Time ago, attempt to convert the TNewNotebook Delphi Component of Jordan Russell from Inno Setup but failed because the missing units (DsgnIntf, DesignIntf).

Some solution, please?.

Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

davesimplewear

  • Sr. Member
  • ****
  • Posts: 307
    • Davids Freeware
Re: Changing Colors in TNotebook and TPageControls
« Reply #1 on: October 29, 2010, 08:53:49 pm »
Add the IDEIntf package to your dependencies of your package.
> > Many things of DesignEditor are in PropEdits and ComponentEditors.
> > DesignIntf has no equivalent.
All things considered insanity seems the best option

Hydexon

  • Full Member
  • ***
  • Posts: 166
Re: Changing Colors in TNotebook and TPageControls
« Reply #2 on: October 29, 2010, 10:45:23 pm »
Yes, the inconvenient is the code in the file called NewNotebookReg.pas use these units but im not familiarized with the design interface of lazarus.

for investigate see the code:
http://cvs.jrsoftware.org/view/issrc/Components/NewNotebookReg.pas?revision=1.3

but i want other way to change the color of a TNotebook and TPageControl for example a new component inherited, owner draw or other
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

ivan17

  • Full Member
  • ***
  • Posts: 173
Re: Changing Colors in TNotebook and TPageControls
« Reply #3 on: October 29, 2010, 11:28:47 pm »
the default color of TNotebook and TPageControl,is default color depending OS colors. .... How I can fix this?.
simplest way - put a client-aligned panel on a tabsheet; change its color; put the controls on the panel.

Time ago, attempt to convert the TNewNotebook Delphi Component of Jordan Russell from Inno Setup but failed because the missing units (DsgnIntf, DesignIntf).
nothing was missing - it's just that borland (inprise?) renamed some units between delphi 6 and 7 (and moved a few designer stuff around). oh well, just pick up lazarus, make that old control work and make it available to the new community.

Hydexon

  • Full Member
  • ***
  • Posts: 166
Re: Changing Colors in TNotebook and TPageControls
« Reply #4 on: October 30, 2010, 12:08:48 am »
Forget the IDEIntf, DesignIntf, and other units having to do with the IDE interface. And the simplest way is not sufficient, i want change the color the page of the Notebook because in Windows is white and not combine with the colors of my user interface.

One time as tested a code that changes the color of the notebook but doesn't work (tested only in Windows).

Code: [Select]
procedure TForm1.Form1Create(Sender : TObject);
begin
 TNotebook(Notebook1).Color := clBlue;
end;

PS: I tested with a client-aligned panel with other color and i put a tnotebook with a page but have the same color (clWindow) in Windows but tested in Ubuntu with GTK2+ Widget set works. my application must be cross-platform
« Last Edit: October 30, 2010, 12:11:54 am by Hydexon »
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

ivan17

  • Full Member
  • ***
  • Posts: 173
Re: Changing Colors in TNotebook and TPageControls
« Reply #5 on: October 30, 2010, 01:02:02 pm »
because in Windows is white and not combine with the colors of my user interface.

it's not white, just bright (it is a gradient bitmap). you may want to reduce the monitor brightness before it messes up your eyes...

PS: I tested with a client-aligned panel with other color and i put a tnotebook with a page but have the same color (clWindow) in Windows but tested in Ubuntu with GTK2+ Widget set works. my application must be cross-platform

works with a lcl pagecontrol.

Hydexon

  • Full Member
  • ***
  • Posts: 166
Re: Changing Colors in TNotebook and TPageControls
« Reply #6 on: October 30, 2010, 04:00:12 pm »
I'm saying i want to change the color of te Tnotebook pages a other color for example Blue!!!!. If i put a panel with color a TNotebook page in Windows this change a that "Gradient Bitmap" what you say is impossible a change the color this way
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

 

TinyPortal © 2005-2018