how display item superior width ComboBox ?
- ericmagaldi
- Posts: 37
- Joined: Tue Feb 20, 2007 9:26 am
- Location: São Paulo - Brazil
- Contact:
how display item superior width ComboBox ?
Hi.
how display item superior it width ComboBox (open) ?
http://br.geocities.com/ericmagaldi/screen/combobox.jpg
I use Pelles C.
how display item superior it width ComboBox (open) ?
http://br.geocities.com/ericmagaldi/screen/combobox.jpg
I use Pelles C.
virtually,
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- ericmagaldi
- Posts: 37
- Joined: Tue Feb 20, 2007 9:26 am
- Location: São Paulo - Brazil
- Contact:
LayOut and not need adjust for every item insert.Antonio Linares wrote:Why don't you increase its width ?
While it is closed, not need display all character, but during choose (Open), is much important (+informative).
Is possible ???
virtually,
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
- ericmagaldi
- Posts: 37
- Joined: Tue Feb 20, 2007 9:26 am
- Location: São Paulo - Brazil
- Contact:
aff !! never yet one "YES" or "NO" POSSIBLE ?????!!!!!
alternative temporary in my Class:
alternative temporary in my Class:
Code: Select all
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS MComboBox
if nMsg == FM_CLOSEUP
::cToolTip:=::varget()
return ::CloseUp()
endif
return Super:HandleEvent( nMsg, nWParam, nLParam )
virtually,
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Eric,
Sometimes we don't answer a question when we don't get enough information in the question, sorry
Do you mean that you want to increase the width of the shown dropdown list ? If so, then please review the API docs for these two listbox messages, in case that they may help:
#define LB_SETHORIZONTALEXTENT 0x0194
#define LB_SETCOLUMNWIDTH 0x0195
Sometimes we don't answer a question when we don't get enough information in the question, sorry
Do you mean that you want to increase the width of the shown dropdown list ? If so, then please review the API docs for these two listbox messages, in case that they may help:
#define LB_SETHORIZONTALEXTENT 0x0194
#define LB_SETCOLUMNWIDTH 0x0195
Last edited by Antonio Linares on Wed Dec 05, 2007 9:10 am, edited 2 times in total.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Olá Eric,
Veja se este exemplo faz o que você precisa:
Abraços,
Rossine.
Veja se este exemplo faz o que você precisa:
Code: Select all
#include "FiveWin.ch"
#define COMBO_BASE 320
#define CB_SETITEMHEIGTH ( COMBO_BASE + 19 )
#define CB_GETITEMHEIGTH ( COMBO_BASE + 20 )
#define CB_SETDROPPEDWIDTH 0x0160
#define CB_GETDROPPEDWIDTH ( COMBO_BASE + 25 )
function Main()
local oDlg, oCbx
local aEstados := { "AC Acre", "AL Alagoas", "AM Amazônia", "AP Amapá", "BA Bahia", "CE Ceará", "DF Distrito Federal", "ES Espirito Santo", "EX Exterior", "GO Goias", "MA Maranhão", "MG Minas Gerais", "MS Mato Grosso Sul", "MT Mato Grosso", "PA Pará", "PB Paraiba", "PE Pernambuco", "PI Piauí", "PR Paraná", "RJ Rio de Janeiro", "RN Rio Grande Norte", "RO Rondônia", "RR Roraima", "RS Rio Grande Sul", "SC Santa Catarina", "SE Sergipe", "SP São Paulo", "TO Tocantins" }
local cText := aEstados[1]
* Aqui voce retorna a altura da linha do combobox, quando ele esta aberto
extend class TCombobox with message getItemheight( nItem ) inline ::SendMsg( CB_GETITEMHEIGTH, nItem, 0 )
* Aqui voce define a altura da linha do combobox, quando ele esta aberto
extend class TCombobox with message setItemheight( nHeight ) inline ::SendMsg( CB_SETITEMHEIGTH, , nHeight )
* Aqui voce retorna a largura da linha do combobox, quando ele esta aberto
extend class TCombobox with message GETDROPPEDWIDTH() inline ::SendMsg( CB_GETDROPPEDWIDTH, 0, 0 )
* Aqui voce define a largura da linha do combobox, quando ele esta aberto
extend class TCombobox with message SETDROPPEDWIDTH( nWidth ) inline ::SendMsg( CB_SETDROPPEDWIDTH, nWidth, 0 )
DEFINE DIALOG oDlg FROM 0, 0 TO 200, 200 ;
TITLE "DropDown ComboBox Test" pixel
@ 10, 10 COMBOBOX oCbx VAR cText STYLE CBS_DROPDOWNLIST ; && CBS_DROPDOWN ;
ITEMS aEstados size 20, 100 ;
ON CHANGE oDlg:SetText( cText ) pixel
oCbx:bgotfocus := { |oObj| ( oObj:setItemheight( 20 ), oObj:setdroppedwidth( 200 ), oObj:refresh() ) }
ACTIVATE DIALOG oDlg CENTERED
return nil
Rossine.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Hello Otto,
Here the example translated into the English:
Not. Only include this stretch in his file .PRG main:Do we need a changed tComboBox?
Code: Select all
extend class TCombobox with message getItemheight( nItem ) inline ::SendMsg( CB_GETITEMHEIGTH, nItem, 0 )
extend class TCombobox with message setItemheight( nHeight ) inline ::SendMsg( CB_SETITEMHEIGTH, , nHeight )
extend class TCombobox with message GETDROPPEDWIDTH() inline ::SendMsg( CB_GETDROPPEDWIDTH, 0, 0 )
extend class TCombobox with message SETDROPPEDWIDTH( nWidth ) inline ::SendMsg( CB_SETDROPPEDWIDTH, nWidth, 0 )
Code: Select all
#include "FiveWin.ch"
#define COMBO_BASE 320
#define CB_SETITEMHEIGTH ( COMBO_BASE + 19 )
#define CB_GETITEMHEIGTH ( COMBO_BASE + 20 )
#define CB_SETDROPPEDWIDTH 0x0160
#define CB_GETDROPPEDWIDTH ( COMBO_BASE + 25 )
function Main()
local oDlg, oCbx
local aEstados := { "AC Acre", "AL Alagoas", "AM Amazônia", "AP Amapá", "BA Bahia", "CE Ceará", "DF Distrito Federal", "ES Espirito Santo", "EX Exterior", "GO Goias", "MA Maranhão", "MG Minas Gerais", "MS Mato Grosso Sul", "MT Mato Grosso", "PA Pará", "PB Paraiba", "PE Pernambuco", "PI Piauí", "PR Paraná", "RJ Rio de Janeiro", "RN Rio Grande Norte", "RO Rondônia", "RR Roraima", "RS Rio Grande Sul", "SC Santa Catarina", "SE Sergipe", "SP São Paulo", "TO Tocantins" }
local cText := aEstados[1]
* Here you return the height of the line of the combobox, when he is open
extend class TCombobox with message getItemheight( nItem ) inline ::SendMsg( CB_GETITEMHEIGTH, nItem, 0 )
* Here you defined the height of the line of the combobox, when he is open
extend class TCombobox with message setItemheight( nHeight ) inline ::SendMsg( CB_SETITEMHEIGTH, , nHeight )
* Here you return the width of the line of the combobox, when he is open
extend class TCombobox with message GETDROPPEDWIDTH() inline ::SendMsg( CB_GETDROPPEDWIDTH, 0, 0 )
* Here you defined the width of the line of the combobox, when he is open
extend class TCombobox with message SETDROPPEDWIDTH( nWidth ) inline ::SendMsg( CB_SETDROPPEDWIDTH, nWidth, 0 )
DEFINE DIALOG oDlg FROM 0, 0 TO 200, 200 ;
TITLE "DropDown ComboBox Test" pixel
@ 10, 10 COMBOBOX oCbx VAR cText STYLE CBS_DROPDOWNLIST ; && CBS_DROPDOWN ;
ITEMS aEstados size 20, 100 ;
ON CHANGE oDlg:SetText( cText ) pixel
oCbx:bgotfocus := { |oObj| ( oObj:setItemheight( 20 ), oObj:setdroppedwidth( 200 ), oObj:refresh() ) }
ACTIVATE DIALOG oDlg CENTERED
return nil
Hello Rossine,
trying to compile I get this error: I use Harbour.
Regards.
Otto
No code generated
14comobox.prg(22) Error E0030 Syntax error: "syntax error at 'CLASS'"
14comobox.prg(25) Error E0030 Syntax error: "syntax error at 'CLASS'"
14comobox.prg(28) Error E0030 Syntax error: "syntax error at 'CLASS'"
14comobox.prg(31) Error E0030 Syntax error: "syntax error at 'CLASS'"
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Error E2194: Could not find file '14comobox.c'
trying to compile I get this error: I use Harbour.
Regards.
Otto
No code generated
14comobox.prg(22) Error E0030 Syntax error: "syntax error at 'CLASS'"
14comobox.prg(25) Error E0030 Syntax error: "syntax error at 'CLASS'"
14comobox.prg(28) Error E0030 Syntax error: "syntax error at 'CLASS'"
14comobox.prg(31) Error E0030 Syntax error: "syntax error at 'CLASS'"
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Error E2194: Could not find file '14comobox.c'
- carlos vargas
- Posts: 1421
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact: