Jump to content


mcinternet's Content

There have been 8 items by mcinternet (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#20647 NextDBGrid6 with Checkbox Column

Posted by mcinternet on 13 August 2019 - 06:10 PM in NextDBGrid v6 Component

Hi,

 

I have a testtable with a few types of boolean. - MySQL and I work with mydac from devart.

CREATE TABLE `systesttable` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `Bezeichnung` varchar(45) DEFAULT NULL,
  `bol1` tinyint(1) DEFAULT '0',
  `bol2` enum('yes','no') DEFAULT 'no' COMMENT 'Hier wird mit 0 = false und true = 1 gearbeitet',
  `bol3` enum('true','false') DEFAULT 'false',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `ID_UNIQUE` (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Diese Table dient nur Tests während der Entwicklung und enthält keine vom Programm genutzte Daten';

how to get this in a Checkbox Column, so that I only have to click for check and not checked. That does not work.

 

 

regards

 

Jörg alias mcinternet




#20639 Event OnAfterMoveTab

Posted by mcinternet on 06 August 2019 - 06:25 PM in Next Collection v6 Sub-Suite

oh, then do so  :)

 

many thx

 

Kind Regards

 

Jörg




#20637 Event OnAfterMoveTab

Posted by mcinternet on 06 August 2019 - 05:56 PM in Next Collection v6 Sub-Suite

Got it!!!

 

under private:

 

    FAfterTabMoving : TNotifyEvent;
    FOldInt : Integer;
    FNewInt : Integer;
 
Published:
 
property OnAfterTabMoving : TNotifyEvent read FAfterTabMoving write FAfterTabMoving;
 
 
procedure TNxPageControl6.MouseMove(Shift: TShiftState; X, Y: Integer);
var
  NearestTab: TNxPageSheet6;
begin
  inherited;

  { Ignore while in design state }
  if not (csDesigning in ComponentState) then
  begin

    { Tab Moving code }
    if Assigned(PressedPageTab) and TabMoving then
    begin

      { Already Moving }
      if FMoving then
      begin
        NearestTab := GetTabAtPos(Point(X, Y));
        if NearestTab <> nil then
        begin
         // WritelnDebug(IntToStr(NearestTab.Index));
          FNewInt := NearestTab.Index;
          ActivePage.Index := NearestTab.Index;
        end;
        Exit;
      end;

and:

procedure TNxPageControl6.MouseUp(Button: TMouseButton; Shift: TShiftState; X,
  Y: Integer);
begin
  inherited;

  { Change cursor back }
  Moving := False;
  if FOldInt <> FNewInt then DoAfterTabMode;
  FOldInt := 0;
  FNewInt := 0;

For completing this Code (public)

 

procedure TNxPageControl6.DoAfterTabMode;
begin
  if Assigned(FAfterTabMoving) then FAfterTabMoving(self);
end;
 
 
Kind regards
 
Jörg alias mcinternet
 
 
@Boki: pls. implement this property so as it is in the next release  :rolleyes:



#20636 Event OnAfterMoveTab

Posted by mcinternet on 06 August 2019 - 05:41 PM in Next Collection v6 Sub-Suite

That seems not to be the right place ?

 

Regards

 

Jörg alias mcinternet




#20635 Event OnAfterMoveTab

Posted by mcinternet on 06 August 2019 - 05:08 PM in Next Collection v6 Sub-Suite

I just made tests with new and old index - no successfull results. The event must be fired AFTER moving, when the mousebutton goes up.

 

Regards

 

Jörg alias mcinternet




#20633 Event OnAfterMoveTab

Posted by mcinternet on 06 August 2019 - 04:52 PM in Next Collection v6 Sub-Suite

Hi Boki,

 

I did it here, that´s not good!

 

procedure TNxPageControl6.MouseMove(Shift: TShiftState; X, Y: Integer);
var
  NearestTab: TNxPageSheet6;
begin
  inherited;

  { Ignore while in design state }
  if not (csDesigning in ComponentState) then
  begin

    { Tab Moving code }
    if Assigned(PressedPageTab) and TabMoving then
    begin
      { Already Moving }
      if FMoving then
      begin
        NearestTab := GetTabAtPos(Point(X, Y));
        if NearestTab <> nil then
        begin
    //        WritelnDebug(IntToStr(NearestTab.Index));
          ActivePage.Index := NearestTab.Index;
          DoAfterTabMode;     // Hier eingefügt JB
        end;
        Exit;
      end;

Always, if you move the mouse (pressed), the event pops up

 

regards

 

Jörg alias mcinternet




#20628 Event OnAfterMoveTab

Posted by mcinternet on 05 August 2019 - 06:55 PM in Next Collection v6 Sub-Suite

Hi,

I will try to add it. It should be easy.

Can you pls. post it here? - I need it really urgent.

 

thx in adv

 

kind regards

 

Jörg alias mcinternet




#20626 Event OnAfterMoveTab

Posted by mcinternet on 05 August 2019 - 06:40 PM in Next Collection v6 Sub-Suite

Hi,

 

Is it possible to make an event which is fired after a tab is moved?

 

I only need the info, where to place that. I think I can implement it by myself, if I know where.

 

 

kind regards

 

mcinternet