Thanks, for the code.

Just to make sure I am understanding the demo correctly.

I have to press the left mouse button then [Shift] or [Ctrl] and select
some others and then press the right mouse button before releasing the
left mouse button.

If I just release the left mouse button without clicking the right the
selection clears itself. 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MikeB
Posted At: Tuesday, November 23, 2004 9:32 AM
Posted To: RB7-L
Conversation: [RBG7-L] - RE: CHKBOX funtionality in Forms
Subject: [RBG7-L] - RE: CHKBOX funtionality in Forms


After you Install the New Update Here is some QuickStart Code to see how
it
works:

Do this in ConComp as the Company Table is used in the sample code.

Copy the following from "object" to the Last "end".  Create a new form
based on "Dummy" or "FormTable".  In Form Designer, click on the blank
form and then Paste the Copied Code and all the controls will appear
with the eeps.  From there, it is self explanatory...


object RButton3: TRButton
  Left = 218
  Top = 15
  Width = 108
  Height = 49
  Caption = 'Check Selected State of Lisbox Items'
  ParentShowHint = False
  ShowHint = True
  TabOrder = 0
  EEPNum = -1
  CustomEEP.Strings = (
    'SET VAR vsel TEXT = NULL'
    'SET VAR vcnt TEXT = NULL'
    'SET VAR vindex TEXT = NULL'
    'SET VAR vchk INTEGER = NULL'
    'GetProperty lbcompany listcount '#39'vcnt'#39
    'IF (INT(.vcnt)) > 0 THEN'
    '  SET VAR vindex = '#39'0'#39
    '  WHILE (INT(.vindex)) <> (INT(.vcnt)) THEN'
    '    SET VAR vchk = (INT(.vindex))'
    '    PROPERTY lbcompany CHECKINDEX .vchk'
    '    GETPROPERTY lbcompany selectedstate '#39'vsel'#39
    '    IF vsel = '#39'TRUE'#39' THEN'
    '      SET VAR vmsg = +'
    '      ('#39'Item #'#39' & (CTXT((INT(.vindex)) + 1)) & +'
    '      '#39'Is Selected'#39')'
    '      PAUSE 2 USING .vmsg'
    '    ENDIF'
    '    SET VAR vindex = (CTXT((INT(.vindex)) + 1))'
    '  ENDWHILE'
    'ENDIF'
    'RETURN')
end
object RVarUserListBox2: TRVarUserListBox
  Left = 10
  Top = 10
  Width = 191
  Height = 241
  ItemHeight = 13
  TabOrder = 1
  CompID = 'lbCompany'
  RecalcVar = False
  VarName = 'vlbVar'
  ExpTable = 'Customer'
  CustomClick.Strings = (
    'PROPERTY lbCompany MultiSelect '#39'True'#39
    'return')
end
object RBEdit1: TRBEdit
  Left = 215
  Top = 167
  Width = 121
  Height = 21
  TabOrder = 2
  Text = 'vListSel'
  Formatted = False
  UseDynamicWhere = False
  CompID = 'veIdx'
  RecalcVar = False
  VarName = 'vListSel'
  PMType = ptSingle
  PMAccess = False
  PMAuto = False
  PMCust = False
  PMSkip = False
  PMLines = 5
end
object RButton1: TRButton
  Left = 215
  Top = 127
  Caption = 'Toggle'
  TabOrder = 3
  EEPNum = -1
  CustomEEP.Strings = (
    'SET VAR vlist TEXT = NULL'
    'SET VAR vchk INTEGER = 0'
    ''
    'getproperty veidx TEXT '#39'vlist'#39
    'IF (SLEN(.vlist)) = 0 THEN'
    '  RETURN'
    'ENDIF'
    'SET VAR vcnt = (CTXT((itemcnt(.vlist))))'
    'SET VAR vindex TEXT = '#39'1'#39
    'WHILE (INT(.vindex)) < ((INT(.vcnt)) + 1) THEN'
    '  SET VAR vchk = (INT((SSUB(.vlist,(INT(.vindex))))))'
    '  PROPERTY lbcompany checkindex .vchk'
    '  GETPROPERTY lbcompany selectedstate '#39'vsel'#39
    '  IF vsel = '#39'TRUE'#39' THEN'
    '    PROPERTY lbcompany unselect .vchk'
    '  ELSE'
    '    PROPERTY lbcompany SELECT .vchk'
    '  ENDIF'
    '  SET VAR vindex = (CTXT((INT(.vindex)) + 1 ))'
    'ENDWHILE'
    'RETURN')
end
object RBLabel1: TRBLabel
  Left = 210
  Top = 202
  Width = 167
  Height = 52
  Cursor = crArrow
  Caption =
    'Enter Series of Comma Separated Numbers Less than the Number Of ' +
    'Items In The ListBox Then Press the TOGGLE Button.'
  WordWrap = True
  BlinkIntervalOff = 505
  BlinkIntervalOn = 5
  FrameSides = []
  UseAsLink = False
  EEPNum = 0
  UseAsLinkEEP = False
end
object RBLabel2: TRBLabel
  Left = 215
  Top = 67
  Width = 168
  Height = 52
  Cursor = crArrow
  Caption =
    'Using the Ctrl Key or Shift key, Select Multiple items in the Li' +
    'stbox, then Press the "Check Selected" Button'
  WordWrap = True
  BlinkIntervalOff = 505
  BlinkIntervalOn = 5
  FrameSides = []
  UseAsLink = False
  EEPNum = 0
  UseAsLinkEEP = False
end




----- Original Message -----
From: "Charles Parks" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 23, 2004 9:24 AM
Subject: [RBG7-L] - RE: CHKBOX funtionality in Forms


Where do these property commands go?

I tried placing them in the on-click eep for the ListBox and nothing
happened.
I then tried placing them in On After start of the form and nothing
happened.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of A. Razzak
Memon
Posted At: Monday, November 22, 2004 8:34 AM
Posted To: RB7-L
Conversation: [RBG7-L] - RE: CHKBOX funtionality in Forms
Subject: [RBG7-L] - RE: CHKBOX funtionality in Forms



At 07:47 AM 11/22/2004 -0600, Charlie Parks wrote:

>There is also the option of using multiple list boxes and properties as

>well.  For a cool example see the spring 2004 conference CD and Mike
>Byerley's Multi Select form.


Charlie,

Along with many other goodies, the upcoming Official Release Version of
Update 78, also known as "R:Cornucopia", will also include a few
additional PROPERTY/GETPROPERTY commands for User Defined ListBox, such
as:

. SELECT n
. UNSELECT n
. CHECKINDEX  n
. SELECTEDSTATE

Complete details with examples will be available in What's New in Update
78, as well as R:Docs!

Very Best R:egards,

Razzak.

Reply via email to