Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox column captions
Message
From
14/12/2017 15:44:27
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01656410
Message ID:
01656433
Views:
76
*you can put the rowsource in combobox.tooltiptext (and form.showtips=.t.)
*you can add a label and its caption=combobox.rowsource
*you can put the 2 solutions as test code below.
*note the combo1.columnCount shows  how many column are visible
*the combo.columnWidths set each visible column.width (pixels-as desired in  columnCount)


Publi oform
oform=Newobject("asup")
oform.Show
Retu

Define Class asup As Form
  Top = 0
  Left = 0
  Height = 366
  Width = 741
  Caption = "Form1"
  Name = "Form1"

  Add Object combo1 As ComboBox With ;
    Height = 25, ;
    Left = 60, ;
    Top = 48, ;
    Width = 264, ;
    Name = "Combo1"

  Add Object label1 As Label With ;
    AutoSize = .T., ;
    FontSize = 8, ;
    Caption = "", ;
    Height = 16, ;
    Left = 60, ;
    Top = 24, ;
    Width = 2, ;
    Name = "Label1"

  Procedure Init
    With This
      .ShowTips=.T.
      .label1.Caption=Strtran(.combo1.RowSource,",","|")+"|"
    Endwith
  Endproc

  Procedure Load
    Sele *From Home(1)+"samples\data\customer" Into Cursor ycurs
    *brow
  Endproc

  Procedure combo1.Init
    Local m.x
    With This
      m.x="ycurs."+Field(1)+","+Field(2)+","+Field(3)+","+Field(4)+","+Field(5)+","+Field(6)
      .RowSource=m.x
      .ColumnCount=6
      .ColumnWidths="100,100,100,100,100,100"
      .RowSourceType=6
      Locate
      .ListIndex=1
      .Style=2

      .ToolTipText=Strtran(.RowSource,",","|")
    Endwith
  Endproc

Enddefine
*
*-- EndDefine: asup
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform