Recent

Author Topic: TPageControl and TTabsheet  (Read 5109 times)

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Re: TPageControl and TTabsheet
« Reply #15 on: June 11, 2019, 11:32:51 am »
 thank  for all time lucamar
Yes Henk is a problem in supporting languages ​​from right to left
Also the shellfish is a similar problem in the dbgride when changing the settings from right to left cursor acts opposite the direction of the grid
Are they recommended solutions?
And raise this Ka bug

--------------
Translation by Google
« Last Edit: June 11, 2019, 11:36:22 am by nouzi »
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: TPageControl and TTabsheet
« Reply #16 on: June 11, 2019, 01:17:10 pm »
As Jaime said, the recommended solution for all this is to use custom drawn controls, i.e. controls which don't depend on the default drawing being done by the system.

I don't use them normally so I can't recommend any one set, but there are quite a lot of them. Search the wiki for a few and use whchever takes your fancy.

Beyond that, what I do the few times I need to tweak how some control draws is to add a handler to its OnPaint event. Unfortunately (for your use case) both TPageControl and TTabSheet descends almost directly from TWinControl and the OnPaint event is introduced by TCustomControl, which means they don't have it.

I'm not sure what else I can tell you, except ... just let it draw as it wants! That's what desktop theming is for :)


BTW, completely unrelated but "Google translate" did you a diservice: shellfish? Henk? Ka bug? WTH? :D
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Re: TPageControl and TTabsheet
« Reply #17 on: June 11, 2019, 02:25:27 pm »
 lucamar this work in delphi
Code: Pascal  [Select][+][-]
  1.  procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3. SetWindowLong(PageControl1.Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_ID) or $400000)
  4. end;
  5.  
can not find SetWindowLong in lib lazarus
after cherch im use this inc file
https://lazarus-ccr.sourceforge.io/docs//lcl/lclintf/setwindowlong.html
find error
Code: PHP  [Select][+][-]
  1. ...
  2. Warning: Duplicate file "wincontrol.inc" in "LCLBase 2.0.2", path="D:\bin_dev\stable\lazarus\lcl\include\wincontrol.inc"
  3. winapih.inc(35,18) Error: Identifier not found "HDC"
  4. winapih.inc(35,18) Error: Identifier not found "HDC"
  5. winapih.inc(38,30) Error: Identifier not found "hwnd"
  6. ...
  7.  

name this Technology Mirror
« Last Edit: June 11, 2019, 03:03:04 pm by nouzi »
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: TPageControl and TTabsheet
« Reply #18 on: June 11, 2019, 04:01:05 pm »
SetWindowLong is declared in the unit LCLIntf; you just have to add lclintf to your uses clause.
« Last Edit: June 11, 2019, 04:06:48 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Re: TPageControl and TTabsheet
« Reply #19 on: June 12, 2019, 10:38:22 am »
SetWindowLong is declared in the unit LCLIntf; you just have to add lclintf to your uses clause.
thank lucamar not work
Code: PHP  [Select][+][-]
  1.  
  2. Compile Project, Target: D:\bin_dev\stable\projects\project1.exe: Exit code 1, Errors: 4
  3. unit1.pas(48,38) Error: Identifier not found "GWL_EXSTYLE"
  4. unit1.pas(48,73) Error: Identifier not found "GWL_ID"
  5. unit1.pas(49,37) Error: Identifier not found "GWL_EXSTYLE"
  6. unit1.pas(49,72) Error: Identifier not found "GWL_ID"
  7.  
  8.  
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Re: TPageControl and TTabsheet
« Reply #20 on: June 12, 2019, 10:43:44 am »
solved after change  the unit LCLIntf with windows
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Re: TPageControl and TTabsheet
« Reply #21 on: June 12, 2019, 10:56:16 am »
 deformation See the attached pictures
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

 

TinyPortal © 2005-2018