Hiding transparent label at changing Tab page caption

Moderator: Rathinagiri

Post Reply
User avatar
gfilatov
Posts: 547
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 13 times
Been thanked: 119 times
Contact:

Hiding transparent label at changing Tab page caption

Post by gfilatov » Tue Mar 02, 2010 12:21 pm

Hi,

I've a small bugreport. :?
There is a hiding of the transparent label at the changing of Tab page caption.

Please take a look for sample below: :arrow:

Code: Select all

/*
 * MINIGUI - Harbour Win32 GUI library Demo
 *
 * Copyright 2008 Roberto Lopez <harbourminigui@gmail.com>
 * http://harbourminigui.googlepages.com/
*/

#include "hmg.ch"

Function Main
Local aRows [20] [3]

	aRows [1]	:= {'Simpson','Homer','555-5555'}
	aRows [2]	:= {'Mulder','Fox','324-6432'} 
	aRows [3]	:= {'Smart','Max','432-5892'} 
	aRows [4]	:= {'Grillo','Pepe','894-2332'} 
	aRows [5]	:= {'Kirk','James','346-9873'} 

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 640 HEIGHT 480 ;
		TITLE 'Harbour MiniGUI Demo' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'Test'
				MENUITEM 'Get Tab_1 page 1 Caption' ACTION MsgInfo ( Form_1.Tab_1.Caption(1) ) 
				MENUITEM 'Set Tab_1 page 1 Caption' ACTION Form_1.Tab_1.Caption(1) := 'New'
			END POPUP
		END MENU

		DEFINE TAB Tab_1 ;
			AT 10,10 ;
			WIDTH 600 ;
			HEIGHT 400 ;
			VALUE 1 ;
			TOOLTIP 'Tab Control' 

			PAGE 'Page 1' IMAGE "exit.bmp"

				DEFINE LABEL Label_1
					ROW	55
					COL	30
					VALUE 'Label 1' 
					WIDTH 100 
					HEIGHT 27 
					TRANSPARENT .T.
				END LABEL

				DEFINE LABEL Label_2
					ROW	85
					COL	30
					VALUE 'Label 2' 
					WIDTH 100 
					HEIGHT 27 
					TRANSPARENT .T.
				END LABEL

			      @ 100,250 BUTTON Button_1 CAPTION "Test" WIDTH 50 HEIGHT 50 ACTION MsgInfo('Test!')

			END PAGE

			PAGE 'Page &2' IMAGE "info.bmp"

				DEFINE RADIOGROUP R1
					ROW	100
					COL	100
					OPTIONS	{ '1','2','3' }
					VALUE	1
				END RADIOGROUP

			END PAGE

			PAGE 'Page 3' IMAGE "check.bmp"

				@ 100,250 SPINNER Spinner_1 ;
				RANGE 0,10 ;
				VALUE 5 ;
				WIDTH 100 ;
				TOOLTIP 'Range 0,10' ; 
				ON CHANGE PlayBeep() 

			END PAGE

			PAGE 'Page 4' IMAGE "button.bmp"

				@ 50,50 GRID Grid_1 ;
					WIDTH 200 ;
					HEIGHT 330 ;
					HEADERS {'Last Name','First Name','Phone'} ;
					WIDTHS {140,140,140};
					ITEMS aRows ;
					VALUE 1 

			END PAGE

		END TAB

	END WINDOW

	Form_1.Center

	Form_1.Activate

Return Nil
The labels on first page of Tab are disappeared after mouse click on menuiteim 'Set Tab_1 page 1 Caption' :oops:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

User avatar
hmgchang
Posts: 239
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia
Has thanked: 1 time
Been thanked: 4 times

Post by hmgchang » Sun Apr 15, 2018 7:33 am

Dear Sir,

Pls try :

Code: Select all

/*
 * MINIGUI - Harbour Win32 GUI library Demo
 *
 * Copyright 2008 Roberto Lopez <harbourminigui@gmail.com>
 * http://harbourminigui.googlepages.com/
*/

#include "hmg.ch"

Function Main
Local aRows [20] [3]

   aRows [1]   := {'Simpson','Homer','555-5555'}
   aRows [2]   := {'Mulder','Fox','324-6432'}
   aRows [3]   := {'Smart','Max','432-5892'}
   aRows [4]   := {'Grillo','Pepe','894-2332'}
   aRows [5]   := {'Kirk','James','346-9873'}

   DEFINE WINDOW Form_1 ;
      AT 0,0 ;
      WIDTH 640 HEIGHT 480 ;
      TITLE 'Harbour MiniGUI Demo' ;
      MAIN

      DEFINE MAIN MENU
         DEFINE POPUP 'Test'
            MENUITEM 'Get Tab_1 page 1 Caption' ACTION MsgInfo ( Form_1.Tab_1.Caption(1) )
            MENUITEM 'Set Tab_1 page 1 Caption' ACTION { || Form_1.Tab_1.Caption(1) := 'New', ;
                                                         Form_1.Tab_1.hide, ;
                                                         Form_1.Tab_1.show}
         END POPUP
      END MENU

      DEFINE TAB Tab_1 ;
         AT 10,10 ;
         WIDTH 600 ;
         HEIGHT 400 ;
         VALUE 1 ;
         TOOLTIP 'Tab Control'

         PAGE 'Page 1' IMAGE "exit.bmp"

            DEFINE LABEL Label_1
               ROW   55
               COL   30
               VALUE 'Label 1'
               WIDTH 100
               HEIGHT 27
               TRANSPARENT .F.
            END LABEL

            DEFINE LABEL Label_2
               ROW   85
               COL   30
               VALUE 'Label 2'
               WIDTH 100
               HEIGHT 27
               TRANSPARENT .F.
            END LABEL

               @ 100,250 BUTTON Button_1 CAPTION "Test" WIDTH 50 HEIGHT 50 ACTION MsgInfo('Test!')

         END PAGE

         PAGE 'Page &2' IMAGE "info.bmp"

            DEFINE RADIOGROUP R1
               ROW   100
               COL   100
               OPTIONS   { '1','2','3' }
               VALUE   1
            END RADIOGROUP

         END PAGE

         PAGE 'Page 3' IMAGE "check.bmp"

            @ 100,250 SPINNER Spinner_1 ;
            RANGE 0,10 ;
            VALUE 5 ;
            WIDTH 100 ;
            TOOLTIP 'Range 0,10' ;
            ON CHANGE PlayBeep()

         END PAGE

         PAGE 'Page 4' IMAGE "button.bmp"

            @ 50,50 GRID Grid_1 ;
               WIDTH 200 ;
               HEIGHT 330 ;
               HEADERS {'Last Name','First Name','Phone'} ;
               WIDTHS {140,140,140};
               ITEMS aRows ;
               VALUE 1

         END PAGE

      END TAB

   END WINDOW

   Form_1.Center

   Form_1.Activate

Return Nil
hope it helps

TIA

best rgds,
Chang
Just Hmg It !

User avatar
serge_girard
Posts: 2058
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 416 times
Been thanked: 90 times
Contact:

Post by serge_girard » Sun Apr 15, 2018 7:53 am

Thanks for reporting!

Serge

Post Reply