DEFINE SPLIT BOX casues havoc to EDIT/EDIT EXTENDED

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

DEFINE SPLIT BOX casues havoc to EDIT/EDIT EXTENDED

Post by CCH4CLIPPER »

Hi Escigi/Rathinagiri

Why does adding DEFINE SPLITBOX cause havoc (lots of error messages, disappearing buttons etc as follows :-
Try it out yourself as in the following code snippet:-

Code: Select all

   DEFINE WINDOW MainForm ;
      AT 0,0 ;
      WIDTH 600 ;
      HEIGHT 480 ;
      TITLE 'FAS4MiniGUI' ;
      MAIN       ;
      MDI
      DEFINE MAIN MENU

         POPUP '&File'
            ITEM 'Exit'       ACTION FileExit() IMAGE 'Exit.Bmp'
         END POPUP
      END MENU

       DEFINE STATUSBAR FONT 'MS Sans Serif' SIZE 9        
            KEYBOARD
            DATE
            CLOCK
       END STATUSBAR

        // VERY IMPORTANT, commenting away solves EDIT/EDITEXTENDED issue but cannot show 'coolbar effect'
       DEFINE SPLITBOX 

      DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 25,25 FLAT BORDER
          BUTTON Button_Close ;
                PICTURE 'exit.bmp' ;
                TOOLTIP 'Close this Window' ;
                AUTOSIZE;
                ACTION Exit();
                SEPARATOR
                
        END TOOLBAR

Regards

CCH
http://cch4clipper.blogspot.com

User avatar
esgici
Posts: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

Post by esgici »

CCH4CLIPPER wrote:
Why does adding DEFINE SPLITBOX cause havoc ... ?
...
Hi CCH

Because of missing END SPLITBOX .

Regards

PS : Being promoted anywhere by anyone doesn't matter for me.

--

Esgici
Viva INTERNATIONAL HMG :D

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER »

Hi Escigi

Yup, silly mistake by me but on further testing I found that although EDIT/EDIT EXTENDED now works, my TOOLBAR on my Main Form will disappear once I chose to Print & Preview.

p/s I don't understand your p/s :-)


Regards

CCH
http://cch4clipper.blogspot.com

User avatar
esgici
Posts: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

Post by esgici »

CCH4CLIPPER wrote:
... my TOOLBAR on my Main Form will disappear once I chose to Print & Preview.

Regards

CCH
Hi CCH

I can't confirm your diagnosis. Here slightly modified your code and works perfect. What is difference ?

Code: Select all

#include "minigui.ch"

PROC Main()

DEFINE WINDOW MainForm ;
   AT 0,0 ;
   WIDTH 600 ;
   HEIGHT 480 ;
   TITLE 'FAS4MiniGUI' ;
   MAIN  ; // MDI
   ON INIT OpNEdEx() ;
   ON RELEASE DBCLOSEALL()
   
   
   DEFINE MAIN MENU
   
      POPUP '&File'
         ITEM 'Exit' ACTION MainForm.Release
      END POPUP
   END MENU
   
   DEFINE STATUSBAR FONT 'MS Sans Serif' SIZE 9 
      KEYBOARD
      DATE
      CLOCK
   END STATUSBAR
   
   // VERY IMPORTANT, commenting away solves EDIT/EDITEXTENDED issue but cannot show 'coolbar effect'
   
  DEFINE SPLITBOX 
   
   DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 25,25 FLAT BORDER
      BUTTON Button_Close ;
      PICTURE 'exit.bmp' ;
      TOOLTIP 'Close this Window' ;
      AUTOSIZE ;
      ACTION MainForm.Release ;
      SEPARATOR
   
   END TOOLBAR
  END SPLITBOX 

END WINDOW // MainForm()

CENTER WINDOW MainForm 
ACTIVATE WINDOW MainForm 
   
RETU // EdExHavoc.Main


PROC OpNEdEx() 
   USE TEST INDE TEST
   EDIT EXTENDED
RETU   
Regards

--

Esgici
Viva INTERNATIONAL HMG :D

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER »

Hi Escigi

OK Now. This issue is now closed

TQ


CCH
http://cch4clipper.blogspot.com

Post Reply