Folders multilinea ( Solved )

User avatar
Raymundo Islas M.
Posts: 590
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Folders multilinea ( Solved )

Post by Raymundo Islas M. »

Antonio/Daniel,

Hay alguna noticia del pequeño desfaze en los folders multilineas ??

Necesito agregar un par de opciones a varios folders y seria fantastico poder hacerlos hacerlos multilinea, ya que se me agoto el espacio para los prompts.

Ya que a nadie les gusto los botones con flechas que salen en la esq. superior derecha para accesar a las siguientes opciones ( ni a mi ) :?


Saludos
Last edited by Raymundo Islas M. on Fri Jun 25, 2010 10:59 pm, edited 1 time in total.
FWH 10.6 + xHarbour + Borland 582
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Folders multilinea

Post by Daniel Garcia-Gil »

Raymundo

mira el ejemplo testfldm.prg, alli tienes un ejemplo de los folder multilinea
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
Raymundo Islas M.
Posts: 590
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Re: Folders multilinea

Post by Raymundo Islas M. »

Daniel,

La unica diferencia que encontre fue :

Code: Select all

CONTROL "[color=#FF0000]FOLDERS[/color]",  11, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | TCS_MULTILINE, 4, 4, 324, 227       <== En Samples
CONTROL ""       , 103, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | TCS_MULTILINE, 50, 5, 463, 358      <== En mi .RC
 
De hecho, si me mostraba las 2 lineas de Prompts, solo que en la parte inferior se "comia" la linea que limita al folder.

En este momento solo cheque el codigo, deja hago mas tarde un par de pruebas colocando la palabra "FOLDERS" en mi archivo .RC

PD : Al intentar abrir el archivo testfldm.rc con WS me indica que que no esta completa la linea donde esta el TCS_MULTILINE aunque si genera correctamente el .exe y de igual manera se muestran correctas las 2 lineas del folder.


Te aviso si todo sale Ok !


Gracias y Saludos
FWH 10.6 + xHarbour + Borland 582
User avatar
Raymundo Islas M.
Posts: 590
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Re: Folders multilinea

Post by Raymundo Islas M. »

Daniel,

Ya hice pruebas y nop, sigue igual.

Si me pinta las 2 lineas de prompts, pero se sigue "comiendo" la linea de abajo del folder.

Image

Ahora, este folder esta dentro de una pestaña de otro folder.

Ya probe poniendo las intrucciones en el on init del Dialog main, usando el binit del folder padre y tambien en el multilinea, y nada.

Saludos
FWH 10.6 + xHarbour + Borland 582
User avatar
ruben Dario
Posts: 986
Joined: Thu Sep 27, 2007 3:47 pm
Location: Colombia

Re: Folders multilinea

Post by ruben Dario »

Raymundo Islas M. wrote:Daniel,

Ya hice pruebas y nop, sigue igual.

Si me pinta las 2 lineas de prompts, pero se sigue "comiendo" la linea de abajo del folder.

Image

Ahora, este folder esta dentro de una pestaña de otro folder.

Ya probe poniendo las intrucciones en el on init del Dialog main, usando el binit del folder padre y tambien en el multilinea, y nada.

Saludos

Puedes publicar el ejemplo del Folder que muestras , el fondo con trayado como lo haces. veo que calza el texto con la linea del fondo.
Gracias
Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
User avatar
Raymundo Islas M.
Posts: 590
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Re: Folders multilinea

Post by Raymundo Islas M. »

Ruben,

Es un XBrowse con un bitmap de fondo, en este caso en el stone.bmp que viene en la carpeta bitmaps, basta que lo apliques como : oBrw:SetBackGround( oBmp )

Saludos
FWH 10.6 + xHarbour + Borland 582
User avatar
ruben Dario
Posts: 986
Joined: Thu Sep 27, 2007 3:47 pm
Location: Colombia

Re: Folders multilinea

Post by ruben Dario »

Raymundo Islas M. wrote:Ruben,

Es un XBrowse con un bitmap de fondo, en este caso en el stone.bmp que viene en la carpeta bitmaps, basta que lo apliques como : oBrw:SetBackGround( oBmp )

Saludos
A partir de que version de FWH tiene oBrw:SetBackGround( oBmp )
porque tengo la 8.03 No lo reconoce
Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
User avatar
Raymundo Islas M.
Posts: 590
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Re: Folders multilinea

Post by Raymundo Islas M. »

Ruben,

Buena pregunta, esa te la contestaria mejor Antonio y/o Daniel pero le quiero calcular que desde hace algunos meses.

Creo, no estoy muy seguro, que en versiones anteriores se maneja de manera diferente, checate el xbrowse.ch o mejor aun, en la carpeta samples.

Yo usaba una version mas atrazada que latuya (7.12) y apenas me actualize hace un par de meses y estoy haciendo uso de todas las nuevas bondades que ofrece.


Saludos
FWH 10.6 + xHarbour + Borland 582
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Folders multilinea

Post by Antonio Linares »

Raymundo,

Basicamente por lo que he leido es un folder en una pestaña de otro folder, si ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Raymundo Islas M.
Posts: 590
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Re: Folders multilinea

Post by Raymundo Islas M. »

Master Antonio,

Asi es, el folder multiline no lo defino sobre el dialog directamente, esta contenido dentro de una pestaña de otro folder.

Saludos
FWH 10.6 + xHarbour + Borland 582
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Folders multilinea

Post by Antonio Linares »

Raymundo,

Partamos de un ejemplo que podamos probar todos :-)

test.prg // de momento sin usar multiples líneas de tabs en el folder interior

Code: Select all

#include "FiveWin.ch"
 
function Main()
 
   local oDlg, oFld1, oFld2
   
   DEFINE DIALOG oDlg RESOURCE "Test"
 
   REDEFINE FOLDER oFld1 ;
      PROMPTS "One", "Two", "three" ;
      DIALOGS "Another", "Two", "Three" ;
      ID 100 OF oDlg

   REDEFINE FOLDER oFld2 ;
      PROMPTS "One", "Two", "three" ;
      DIALOGS "One", "Two", "Three" ;
      ID 200 OF oFld1:aDialogs[ 1 ]
      
   ACTIVATE DIALOG oDlg CENTERED
 
return nil
 
test.rc

Code: Select all

#ifdef __FLAT__
   1 24 "WindowsXP.Manifest" 
#endif
 
test DIALOG 17, 36, 185, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 100, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 6, 175, 170
 DEFPUSHBUTTON "OK", 1, 67, 180, 50, 14
}

another DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
 CONTROL "", 200, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 6, 162, 140
}
 
one DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
   PUSHBUTTON "Test", 10, 5, 5, 148, 115
}
 
two DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
}
 
three DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
}
 
Se ve asi:
Image

Ahora probemos con multiples líneas de pestañas...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Folders multilinea

Post by Antonio Linares »

Efectivamente como comentabas, el diálogo interior invade el margen inferior:

Code: Select all

#include "FiveWin.ch"
 
function Main()
 
   local oDlg, oFld1, oFld2
   
   DEFINE DIALOG oDlg RESOURCE "Test"
 
   REDEFINE FOLDER oFld1 ;
      PROMPTS "One", "Two", "three" ;
      DIALOGS "Another", "Two", "Three" ;
      ID 100 OF oDlg

   REDEFINE FOLDER oFld2 ;
      PROMPTS "One", "Two", "three", "four", "five", "six" ;
      DIALOGS "One", "Two", "Three", "One", "Two", "Three" ;
      ID 200 OF oFld1:aDialogs[ 1 ]
      
   ACTIVATE DIALOG oDlg CENTERED
 
return nil
 


test.rc

Code: Select all

#ifdef __FLAT__
   1 24 "WindowsXP.Manifest" 
#endif
 
test DIALOG 17, 36, 185, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 100, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 6, 175, 170
 DEFPUSHBUTTON "OK", 1, 67, 180, 50, 14
}

another DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
 CONTROL "", 200, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP | TCS_MULTILINE, 5, 6, 162, 140
}
 
one DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
   PUSHBUTTON "Test", 10, 5, 5, 148, 115
}
 
two DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
}
 
three DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
}
 

Asi se ve:
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Raymundo Islas M.
Posts: 590
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Re: Folders multilinea

Post by Raymundo Islas M. »

Master Antonio,

Es exactamente como lo indicas.

Disculpa si desde un principio se me paso comentar que era un folder contenido en otro.

Saludos.
FWH 10.6 + xHarbour + Borland 582
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Folders multilinea

Post by Antonio Linares »

Y podemos ajustarlo modificando el dato nFdHeight del folder:

test.prg

Code: Select all

#include "FiveWin.ch"
 
function Main()
 
   local oDlg, oFld1, oFld2
   
   DEFINE DIALOG oDlg RESOURCE "Test"
 
   REDEFINE FOLDER oFld1 ;
      PROMPTS "One", "Two", "three" ;
      DIALOGS "Another", "Two", "Three" ;
      ID 100 OF oDlg

   REDEFINE FOLDER oFld2 ;
      PROMPTS "One", "Two", "three", "four", "five", "six" ;
      DIALOGS "One", "Two", "Three", "One", "Two", "Three" ;
      ID 200 OF oFld1:aDialogs[ 1 ]
      
   oFld2:nFdHeight = 39   
      
   ACTIVATE DIALOG oDlg CENTERED
 
return nil
 


test.rc

Code: Select all

 #ifdef __FLAT__
   1 24 "WindowsXP.Manifest" 
#endif
 
test DIALOG 17, 36, 185, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 100, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 6, 175, 170
 DEFPUSHBUTTON "OK", 1, 67, 180, 50, 14
}

another DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
 CONTROL "", 200, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP | TCS_MULTILINE, 5, 6, 162, 140
}
 
one DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
   PUSHBUTTON "Test", 10, 5, 5, 148, 105
}
 
two DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
}
 
three DIALOG 6, 15, 175, 117
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
{
}
 
Asi se ve ahora:
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Folders multilinea

Post by Antonio Linares »

Se puede intentar automatizar el cálculo de dicha altura de esta forma:

test.prg

Code: Select all

#include "FiveWin.ch"
 
function Main()
 
   local oDlg, oFld1, oFld2
   
   DEFINE DIALOG oDlg RESOURCE "Test"
 
   REDEFINE FOLDER oFld1 ;
      PROMPTS "One", "Two", "three" ;
      DIALOGS "Another", "Two", "Three" ;
      ID 100 OF oDlg

   REDEFINE FOLDER oFld2 ;
      PROMPTS "One", "Two", "three", "four", "five", "six" ;
      DIALOGS "One", "Two", "Three", "One", "Two", "Three" ;
      ID 200 OF oFld1:aDialogs[ 1 ]
      
   // oFld2:nFdHeight = 39   
      
   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT ( oFld2:nFdHeight := FldGetItemHeight( oFld2:hWnd ),;
                oFld2:ReSize( 0, oFld2:nWidth, oFld2:nHeight - oFld2:nFdHeight - 2 ) )
 
return nil

#pragma BEGINDUMP

#include <windows.h>
#include <commctrl.h>
#include <hbapi.h>

HB_FUNC( FLDGETITEMHEIGHT )
{
   RECT rct;
   
   SendMessage( ( HWND ) hb_parnl( 1 ), TCM_GETITEMRECT, 1, ( LPARAM ) &rct );
   
   hb_retnl( rct.bottom - rct.top );
}

#pragma ENDDUMP    
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply