Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 14:30

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 03 Sep 2019, 20:50 
Offline

Joined: 13 Jul 2019, 19:08
Posts: 88
1º When I change the Scala of a form if I have Data in "PickList" when opening combobox the height cuts the letters, see this attached project, how do I solve it ?


2º how could I do to put this code in Class
so you don't have to keep changing fonts every time you get a new version of yourself.

Code:
if IsSearchingState and
      ( (Selection.SelectionType = gstNon) or
        ( (Selection.SelectionType <> gstNon) {and (gdSelected in ColCellParamsEh.State)} )
      ) then

like this

if //IsSearchingState and
      ( (Selection.SelectionType = gstNon) or
        ( (Selection.SelectionType <> gstNon) {and (gdSelected in ColCellParamsEh.State)} )
      ) then

in the method
procedure TCustomDBGridEh.DrawColumnDataCellMainContent(


Would it be possible to implement this code Up in the Class Below that you passed me ?

Code:
{ TLFColumn }
Type
TLFColumn = Class(TDBGridColumnEh)
Private
  FExpanded: Boolean;
published
  property Expanded: Boolean read FExpanded write FExpanded;
end;

{ TLFDBGridColumnsEh }
TLFDBGridColumnsEh = class(TDBGridColumnsEh)
private
  function GetColumn(Index: Integer): TLFColumn;
  procedure SetColumn(Index: Integer; const Value: TLFColumn);
public
  property Items[Index: Integer]: TLFColumn read GetColumn write SetColumn; default;
end;

{ TLFDBGridEh }
TDBGrid = class(DBGridEh.TDBGridEh)
private
  function GetColumns: TLFDBGridColumnsEh;
  procedure SetColumns(const Value: TLFDBGridColumnsEh);
protected
  function CreateAxisBars: TGridAxisBarsEh; override;
public
published
  property Columns: TLFDBGridColumnsEh read GetColumns write SetColumns;
end;

{ TLFDBGridEh }

function TDBGrid.CreateAxisBars: TGridAxisBarsEh;
begin
Result := TLFDBGridColumnsEh.Create(Self, TLFColumn);
end;

function TDBGrid.GetColumns: TLFDBGridColumnsEh;
begin
Result := TLFDBGridColumnsEh(inherited Columns);
end;

procedure TDBGrid.SetColumns(const Value: TLFDBGridColumnsEh);
begin
inherited Columns := Value;
end;

{ TLFDBGridColumnsEh }

function TLFDBGridColumnsEh.GetColumn(Index: Integer): TLFColumn;
begin
Result := TLFColumn(inherited Items[Index]);
end;

procedure TLFDBGridColumnsEh.SetColumn(Index: Integer; const Value: TLFColumn);
begin
inherited Items[Index] := Value;
end;

Or it could be to create a new property to control this action so that we can choose if we want to leave the color while focusing on the Grid.


3º How could I display the holidays of the year by painting the day and show through a Hint in the "TPlannerCalendarPickerEh" component this way when the user puts the "mouse" on a holiday day so a description of the holiday can be shown ?

4º How to put scrollbar in "TDBVertGridEh" to show too many records because I can only show one record and need to show multiple records I don't know which property enables scrollbar to display next ?


Attachments:
Scaled PickList.zip [31.68 KiB]
Downloaded 106 times
Top
 Profile  
 
PostPosted: 05 Sep 2019, 13:30 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
Luciano, você teve problemas com os calendários na Grid? Por que aqui ficou com os dias fora de lugar em alguns meses e eu tive que ajustar manualmente no fonte. O calendário deles começa com os dias da semana: SegTerQuaQuiSexSabDom e o nosso calendário brasileiro começa DomSegTerQuaQuiSexSab, aí no calendario da EhLib mostrava que por exemplo Julho começou em uma terça-feira mas no calendário correto foi em uma segunda-feira.
Luciano_F wrote:
1º When I change the Scala of a form if I have Data in "PickList" when opening combobox the height cuts the letters, see this attached project, how do I solve it ?


2º how could I do to put this code in Class
so you don't have to keep changing fonts every time you get a new version of yourself.

Code:
if IsSearchingState and
      ( (Selection.SelectionType = gstNon) or
        ( (Selection.SelectionType <> gstNon) {and (gdSelected in ColCellParamsEh.State)} )
      ) then

like this

if //IsSearchingState and
      ( (Selection.SelectionType = gstNon) or
        ( (Selection.SelectionType <> gstNon) {and (gdSelected in ColCellParamsEh.State)} )
      ) then

in the method
procedure TCustomDBGridEh.DrawColumnDataCellMainContent(


Would it be possible to implement this code Up in the Class Below that you passed me ?

Code:
{ TLFColumn }
Type
TLFColumn = Class(TDBGridColumnEh)
Private
  FExpanded: Boolean;
published
  property Expanded: Boolean read FExpanded write FExpanded;
end;

{ TLFDBGridColumnsEh }
TLFDBGridColumnsEh = class(TDBGridColumnsEh)
private
  function GetColumn(Index: Integer): TLFColumn;
  procedure SetColumn(Index: Integer; const Value: TLFColumn);
public
  property Items[Index: Integer]: TLFColumn read GetColumn write SetColumn; default;
end;

{ TLFDBGridEh }
TDBGrid = class(DBGridEh.TDBGridEh)
private
  function GetColumns: TLFDBGridColumnsEh;
  procedure SetColumns(const Value: TLFDBGridColumnsEh);
protected
  function CreateAxisBars: TGridAxisBarsEh; override;
public
published
  property Columns: TLFDBGridColumnsEh read GetColumns write SetColumns;
end;

{ TLFDBGridEh }

function TDBGrid.CreateAxisBars: TGridAxisBarsEh;
begin
Result := TLFDBGridColumnsEh.Create(Self, TLFColumn);
end;

function TDBGrid.GetColumns: TLFDBGridColumnsEh;
begin
Result := TLFDBGridColumnsEh(inherited Columns);
end;

procedure TDBGrid.SetColumns(const Value: TLFDBGridColumnsEh);
begin
inherited Columns := Value;
end;

{ TLFDBGridColumnsEh }

function TLFDBGridColumnsEh.GetColumn(Index: Integer): TLFColumn;
begin
Result := TLFColumn(inherited Items[Index]);
end;

procedure TLFDBGridColumnsEh.SetColumn(Index: Integer; const Value: TLFColumn);
begin
inherited Items[Index] := Value;
end;

Or it could be to create a new property to control this action so that we can choose if we want to leave the color while focusing on the Grid.


3º How could I display the holidays of the year by painting the day and show through a Hint in the "TPlannerCalendarPickerEh" component this way when the user puts the "mouse" on a holiday day so a description of the holiday can be shown ?

4º How to put scrollbar in "TDBVertGridEh" to show too many records because I can only show one record and need to show multiple records I don't know which property enables scrollbar to display next ?


Top
 Profile  
 
PostPosted: 05 Sep 2019, 14:09 
Offline

Joined: 13 Jul 2019, 19:08
Posts: 88
Quote:
Luciano, você teve problemas com os calendários na Grid? Por que aqui ficou com os dias fora de lugar em alguns meses e eu tive que ajustar manualmente no fonte. O calendário deles começa com os dias da semana: SegTerQuaQuiSexSabDom e o nosso calendário brasileiro começa DomSegTerQuaQuiSexSab, aí no calendario da EhLib mostrava que por exemplo Julho começou em uma terça-feira mas no calendário correto foi em uma segunda-feira.


Eu não tive problema com os Calendários aqui ficou certinho.
você passou essa correção para o autor ?


Top
 Profile  
 
PostPosted: 05 Sep 2019, 15:44 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Quote:
1º When I change the Scala of a form if I have Data in "PickList" when opening combobox the height cuts the letters, see this attached project, how do I solve it ?

We will fix it at the next build.
Thank you for information.

Quote:
2º how could I do to put this code in Class
so you don't have to keep changing fonts every time you get a new version of yourself.

Unfortunately, you cannot add this to the inherited class.
There are not virtual method in the base class to define if text should be Highlighted.
We will add such a method in the next version of EhLib.


Quote:
3º How could I display the holidays of the year by painting the day and show through a Hint in the "TPlannerCalendarPickerEh" component this way when the user puts the "mouse" on a holiday day so a description of the holiday can be shown ?

Unfortunately, this feature is not provided.
We will consider possibly adding hint display events for cells in TPlannerCalendarPickerEh to the next version of the library.

Quote:
4º How to put scrollbar in "TDBVertGridEh" to show too many records because I can only show one record and need to show multiple records I don't know which property enables scrollbar to display next ?

Unfortunately, TDBVertGridEh does not support displaying multiple records vertically.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 06 Sep 2019, 11:45 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
Luciano_F wrote:
Quote:
Luciano, você teve problemas com os calendários na Grid? Por que aqui ficou com os dias fora de lugar em alguns meses e eu tive que ajustar manualmente no fonte. O calendário deles começa com os dias da semana: SegTerQuaQuiSexSabDom e o nosso calendário brasileiro começa DomSegTerQuaQuiSexSab, aí no calendario da EhLib mostrava que por exemplo Julho começou em uma terça-feira mas no calendário correto foi em uma segunda-feira.


Eu não tive problema com os Calendários aqui ficou certinho.
você passou essa correção para o autor ?


Eu até criei um tópico sobre, mas nunca responderam.


Top
 Profile  
 
PostPosted: 06 Sep 2019, 12:25 
Offline

Joined: 13 Jul 2019, 19:08
Posts: 88
danieldavila wrote:
Luciano_F wrote:
Quote:
Luciano, você teve problemas com os calendários na Grid? Por que aqui ficou com os dias fora de lugar em alguns meses e eu tive que ajustar manualmente no fonte. O calendário deles começa com os dias da semana: SegTerQuaQuiSexSabDom e o nosso calendário brasileiro começa DomSegTerQuaQuiSexSab, aí no calendario da EhLib mostrava que por exemplo Julho começou em uma terça-feira mas no calendário correto foi em uma segunda-feira.


Eu não tive problema com os Calendários aqui ficou certinho.
você passou essa correção para o autor ?


Eu até criei um tópico sobre, mas nunca responderam.


Peque o link do tópico e mande como pergunta ao Suporte do EhLib, se o colega tem uma licença ativa ele deve responder.

eu sempre faço isso ele tem me respondido, ele demora mais responde e inclusive agradece quando é um bug, porém você tem montar um projeto onde demostra o Bug.

Eu já apresentei alguns problemas para ele porém demostrei o problema e fui atendido inclusive a busca com o "SearchPanel" era lenta em relação ao XdbGrid que é um componente concorrente e ele melhorou muito a busca depois de ver o comparativo que inclusive eu demostrei por vídeo.


Aproveitando seu topico "http://forum.ehlib.com/en/viewtopic.php?f=5&t=985"
sobre os caracteres com acento eu não consegui usar

Code:
unit Unit1;
...
function MakeStringRoughEh(s: String): String;
begin
Result := StringReplace(s, 'ê', 'e', [rfReplaceAll]);
end;
....

initialization
  DBUtilsEh.MakeStringRoughProcEh := MakeStringRoughEh;
end.


O colega poderia colocar como fez detalhado para mim.
Grato.


Top
 Profile  
 
PostPosted: 09 Sep 2019, 12:26 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
Eu fiz exatamente como eles explicaram no tópico e criei as procedures com os mesmos nomes.
Mas essa parte
initialization
DBUtilsEh.MakeStringRoughProcEh := MakeStringRoughEh;
end.
eu coloquei o DBUtilsEh.MakeStringRoughProcEh := MakeStringRoughEh; por ultimo no Inicialization;

Criei a function MakeStringRoughEh em outra Unit para organização, mas acredito que vc possa fazer isso dentro da DBGridEh.Pas
E para remover os acentos criei a seguinte function:

Code:
function RemoveAcentos(_Value: string): string;
const
  ComAcento = 'àâêôûãõáéíóúçüñÀÂÄÊÔÛÃÕÁÉÍÓÚÇÜ';
  SemAcento = 'aaeouaoaeioucuNAAAEOUAOAEIOUCU';
var
  X: Integer;
begin
  for X := 1 to Length(_Value) do
    if PosEx(_Value[X], ComAcento) <> 0 then
      _Value[X] := SemAcento[PosEx(_Value[X], ComAcento)];
  Result := _Value;
end;


E a chamada:
Code:
function MakeStringRoughEh(s: String): String;
begin
  Result := RemoveAcentos(S);
end;


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 65 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group