Picture Property

HMG en Español

Moderator: Rathinagiri

Post Reply
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Picture Property

Post by danielmaximiliano »

Hi :
I'm trying to figure out how it works Picture Property

<ParentWindowName>.<ControlName>.Picture := cImageName
<ParentWindowName>.<ControlName>.Picture --> cImageName


container TAB accepted indices as a reference to the page I mean

Code: Select all

 this works     Principal.Container_Tab(nX).&(cImage).Width   := Principal.Width - 30
however does not       Principal.Container_Tab(nPage).Picture := "Unselect.bmp"
I find no specific example of property management within the container TAB pages
only simple WindowName.ControlName.Value
or a little more complex Form_1.Tab_1 (1). Grid_1.Caption (1) in ..\hmg.3.0.35\SAMPLES\MAIN.DEMO

Español
estoy intentando saber como funciona Picture Property

<ParentWindowName>.<ControlName>.Picture := cImageName
<ParentWindowName>.<ControlName>.Picture --> cImageName

el contenedor TAB acepta indices como referencia a la pagina que me refiero

Code: Select all

esto funciona    Principal.Container_Tab(nX).&(cImage).Width   := Principal.Width - 30
sin enbargo esto no          Principal.Container_Tab(nPage).Picture := "Unselect.bmp"
no encuentro ejemplo especificos del manejo propiedades de paginas dentro del contenedor TAB
solo el simple WindowName.ControlName.Value
o un poco mas complejo Form_1.Tab_1(1).Grid_1.Caption(1) en ..\hmg.3.0.35\SAMPLES\MAIN.DEMO

Saludos / Greetings
DaNiElMaXiMiLiAnO
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
gfilatov
Posts: 1066
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Picture Property

Post by gfilatov »

Hello Daniel,

Please take a look for updated sample from your folder \hmg\samples\CONTAINERS\Tab below:

Code: Select all

/*
 * HMG - Harbour Win32 GUI library Demo
 *
 * Copyright 2008 Roberto Lopez <mail.box.hmg@gmail.com>
 * http://sites.google.com/site/hmgweb/
*/

#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 'HMG Demo' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'Test'
				MENUITEM 'Get Image Picture' ACTION MsgInfo ( Form_1.Tab_1(1).Image_1.Picture ) 
				MENUITEM 'Set Image Picture' ACTION Form_1.Tab_1(1).Image_1.Picture := 'hmg.gif'
				SEPARATOR
				MENUITEM 'Get Button Caption' ACTION MsgInfo ( Form_1.Tab_1(1).Button_1.Caption ) 
				MENUITEM 'Set Button Caption' ACTION Form_1.Tab_1(1).Button_1.Caption := 'New'
				SEPARATOR
				MENUITEM 'Get Grid Header' ACTION MsgInfo ( Form_1.Tab_1(4).Grid_1.Header(1) ) 
				MENUITEM 'Set Grid Header' ACTION Form_1.Tab_1(4).Grid_1.Header(1) := 'New'
				SEPARATOR
				MENUITEM 'Set Grid Cell' ACTION Form_1.Tab_1(4).Grid_1.Cell(1,1) := 'New'
				MENUITEM 'Get Grid Cell' ACTION MsgInfo ( Form_1.Tab_1(4).Grid_1.Cell(1,1) )
				SEPARATOR
				MENUITEM 'Show Button' ACTION Form_1.Tab_1(1).Button_1.Show()
				MENUITEM 'Hide Button' ACTION Form_1.Tab_1(1).Button_1.Hide()
			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 IMAGE Image_1
					ROW	40
					COL	10
					HEIGHT	110
					WIDTH	230
					PICTURE	'demo.gif'
					STRETCH	.F.
				END IMAGE

			      @ 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 that give you an idea :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Picture Property

Post by danielmaximiliano »

Hi Grigory :
try this

Code: Select all

Procedure UnSelectPage()
 FOR nCounter := 1 TO nPage - 1
     Principal.Container_Tab(nCounter).Picture := "Unselect.bmp"
 NEXT 
RETURN
to select a tab page of the other pages should display an image
"Unselect".
Attachments
Page1.jpg
Page1.jpg (28.41 KiB) Viewed 4521 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
gfilatov
Posts: 1066
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Picture Property

Post by gfilatov »

danielmaximiliano wrote:Hi Grigory :
try this

Code: Select all

Procedure UnSelectPage()
 FOR nCounter := 1 TO nPage - 1
     Principal.Container_Tab(nCounter).Picture := "Unselect.bmp"
 NEXT 
RETURN
to select a tab page of the other pages should display an image
"Unselect".
Hi Daniel,

You are right!

The official HMG have only 'Caption(nPage)' property of Tab's pages for dynamical change at runtime.

BTW There is Image property of Tab's pages in the HMG Extended Edition, i.e.
Form_1.Tab_1.Image( 1 ) := 'Unselect.Bmp'
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Picture Property

Post by danielmaximiliano »

Thanks Grigory
Extended tonight proves

Saludos / Regard
DaNiElMaXiMiLiAnO
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Picture Property

Post by danielmaximiliano »

Hi Everyone:
Find in HMG.4 I can add a picture of PAGE, PAGE disable you want, give Backcolor the TAB or PAGE, is whether ... all I wanted to do in HMG3.x and could not.

Code: Select all

 Page1: Image: = 'open.png'
Tab1: Position: = TAB_TOP
Tab1: Shape: = TAB_TRIANGULAR
Example I am now migrating to take on new qualities of HMG.4 with QT.
Greetings

Español
Hola a Todos :
Encontre en HMG.4 que puedo agregar una imagen del PAGE, desactivar los PAGE que quiera, dar el Backcolor al TAB o al PAGE, es si... todo lo que queria hacer en HMG3.x y no podia.

Code: Select all

 Page1:Image := 'open.png'
Tab1:Position := TAB_TOP
Tab1:Shape   := TAB_TRIANGULAR
ahora estoy migrando el Ejemplo para asumir las nuevas cualidades de HMG.4 con QT.
Saludos
DaNiElMaXiMiLiAnO
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply